How can I refresh files that have been changed outside of Visual Studio?

To refresh the change file automatically, we need to change a setting. Open Visual Studio, choose 'Tools' from menu bar Alt + T. Go to Options > Environment > Documents. Enable these two options

  1. Detect when file is changed outside the environment
  2. Reload modified files unless there are unsaved changes

visual_studio_required_options

The second choice is optional. Press OK. Restart Visual Studio if needed.