6

When working with Unity in Visual Studio, my solution gets often changed from an external source. When Visual Studio realizes that my solution has been changed it asks if I want to reload my solution or not. In my case, I always want to reload it.

Is there a way to skip the dialog box that presents various options and simply always have it reload the solution?

EDIT: I'm using Visual Studio 2015/2017

Feast
  • 123
  • 1
  • 10
  • Possible duplicate of [Make Visual Studio 2010 auto reload solution when project files change](https://stackoverflow.com/questions/4802738/make-visual-studio-2010-auto-reload-solution-when-project-files-change) – Elliott Beach Feb 15 '19 at 19:01

2 Answers2

7

This is what you are looking for :

Tools > Options > Environment > Documents > Detect when a file is changed outside the environment > Reload Modified files.....

For Visual Studio 2017 :

enter image description here

boop_the_snoot
  • 3,209
  • 4
  • 33
  • 44
  • 2
    I enabled that yes, however this popup box still appears when I launch a script from Unity. http://i.imgur.com/dEvUijq.png – Feast Aug 17 '17 at 17:50
  • This is awkward, should have worked. I googled the issue you've been facing and stumbled upon [this](https://stackoverflow.com/questions/1139752/vs2008-disable-asking-whether-to-reload-files-changed-outside-the-ide). Try it once – boop_the_snoot Aug 17 '17 at 17:59
  • I didn't see anything new in that thread. They are saying what you are ;) – Feast Aug 17 '17 at 18:50
  • I had the opposite problem, VS would frequently reload every project in the solution, taking several minutes to do so every time. Your answer helped me figure out which option to uncheck, thanks! – CasualCoder Oct 26 '18 at 16:06
  • Same for me. Still asks no matter what. Feels like a bug – JSON Dec 07 '22 at 14:44
0

A thought occurs. Have your external script that modifies the solution, use the Visual Studio automation model to close the solution, then make your updates, and then re-open the solution?

You could write a Visual Studio extension that adds a menu command to the IDE to invoke your script, unless it's automatic, and then simply choose the command from the menus to invoke your script, wait for it to finish, reloading your solution in the process, and then you're there.