CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Darrell Norton's Blog [MVP]

Fill in description here...

Changing Visual Studio's default project settings

After Jeff Key’s spelunking in the C# wizards, I decided I wanted to change some of the default project settings.  It is actually very easy to do.  The following example shows how you can change the default setting for “Treat Warnings as Errors” from false to true for all new C# library projects.

  1. Navigate to C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\VC#Wizards
  2. Right-click on DefaultDll.csproj and open with notepad.
  3. In the config section (debug or release, or both), add TreatWarningsAsErrors = "true".

Now all your new C# Class Library projects will automatically treat warnings as errors.  Repeat on the other csproj types (or vbproj if you are a VB programmer) to change the default setting for projects of that type too.  There are tons of other settings you can tweak, and this does not prevent anyone from changing it back to false.  But if you are going to use this setting more often than not, it’s quicker.



Comments

Brendan Tompkins said:

Nice.
# April 2, 2004 6:12 AM

Darrell said:

Thanks Brendan, but it's only 99% done. :)
# April 2, 2004 6:51 AM
Check out Devlicio.us!

Our Sponsors