views:

752

answers:

1

How do I set default C/C++ compiler options for all newly created projects in Visual Studio 2008? For example, I'd like to use the highest warning level. I know I can set these options for each project individually, but I'd like to change the defaults for ALL new projects.

+2  A: 

I can think of at least 3 ways:

  1. You can create a template for projects so that when you add a new project through the wizard it will have your default settings.
  2. You can use the property manager to make several projects share properties. It's a way to implement Property Inheritence.
  3. You can use VBA to set the the properties of all projects using a script (shouldn't be more than a few lines for a simple solution). Click Alt-F11, bring up the Object Explorer to learn about the Object Model VS exposes, and hack away.
Assaf Lavie