Share via


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.

Projects and Solutions - Build and Run

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.

Prompt to save files

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.

Technorati Tags: VS2005Tip,VS2008Tip

Comments

  • Anonymous
    September 29, 2008
    My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. Channel 9 Stuff: This Week on C9- New Live Search features, freebies, why TDD fails and Duke Nukem Norman Guadagno- Announcing Visual

  • Anonymous
    October 04, 2008
    I'm sure I'm overlooking something terribly obvious here, but can you expand on the difference between 'Save All Changes' and 'Save Changes To Open Documents Only'? Since when I close a document that I've edited but not saved I am prompted 'do you want to save this?' so how is it possible for me to have an unsaved yet also not open document? Just trying to make sense of why these two different choices are here since I don't understand how 'save all documents' would make any sense. Thanks for all your tips BTW; your RSS feed has long-ago replaced the default one in my VS start page.  Keep up the good work~!

  • Anonymous
    March 03, 2009
    本篇包括tip321-tip330http://www.watch-life.net/visual-studio/visual-studio-2008-tip-day-32.html#321、使用...