Can I get Visual Studio (2010) to do "Save All" when I create my solution?

I have repeated disappointment in Visual Studio 2010. I will add a new file to the project, create, run tests - all is well. Then I will make and push my changes (I use GitExtensions and GitHub)

Finally, I will exit Visual Studio - and ask if I want to save the changes to MyProject.csproj. Of course, after saving the changes, the .csproj file now shows local modifications in GitExtensions, which means that the previous commit / push actually popped the broken code, because I clicked on a new file without the corresponding .csproj file link. This is because Visual Studio does not actually save your .csproj file when adding new files to your project - although it seems that it will compile it quite happily if your changes are not saved to disk yet ...

Is it possible to get Visual Studio to “save everything” whenever I add a new file, or when I run a frequent command, such as creating a solution?

+3
source share
1 answer

Look under Tools Options Projects and Solutions Build And Run Before Building (Save all changes) for the parameter.

enter image description here

Later versions of VS (2012+) should always save your projects when creating.

+3
source

Source: https://habr.com/ru/post/1234241/


All Articles