Visual-studio – Change new projects warning level in VS2008 (Express)

visual-studio-2008

I like having my warning level set at W4 but all new projects start at W3. Is there some way to change the default value for warning levels for new projects?

Best Answer

I don't know how to do it at the IDE but you cand always edit the new project templates at:

%PROGRAM_FILES%\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\

If you're using the express version there could be a minor variation in the path:

%PROGRAM_FILES%\Microsoft Visual Studio 9.0\Common7\IDE\{Version}\ProjectTemplates\

Where {Version} is the express flavor you are using, VCSExpress, VBExpress, etc.

The templates are zip files, just edit the project changing:

<WarningLevel>3</WarningLevel>

to

<WarningLevel>4</WarningLevel>