Did you know… How to configure how and when the IDE saves your files before building? - #323
Ahh, finally, back to one of the IDE feature areas I used to test – Projects and Solutions! And no other better way to start than a Tools Options series…
You can figure at a global level, across all languages (VB, VC, and C# are the ones i’ve tested) in your solution, how, when, and whether Visual Studio saves your files before a build.
Go to the Tools – Options – Projects And Solutions – Build And Run page, and under Before Building: you’ll have the following options:
Save All Changes – pretty obvious. VS will save all unsaved edits whether you hit F5, build the solution, or build a specific project.
Save Changes To Open Documents Only – again, pretty obvious. VS will save all unsaved edits to files that are currently-opened in the IDE, whether you hit F5, build the solution, or build a specific project.
Prompt To Save Changes – You’ll see the standard prompt appear whenever you have unsaved files in the editor.
Don’t Save Any Changes – just as you would expect, keeps unsaved files unsaved. However, VS will build based on the code that appears currently in the editor, and not against the last-saved code that’s one file.