Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off pdb generation and vshost for all Release builds

Every time I start a new piece of software I have to go into the configuration and turn off pdb file generation and the Visual Studio hosting process for Release builds. Is there any way to tell Visual Studio (2008 specifically) that I want to do that for all projects for the rest of time?

like image 472
Dave D Avatar asked Mar 16 '10 11:03

Dave D


People also ask

Should I include PDB files in release?

The inclusion of . PDB files in a web application's deployment is safe and doesn't include the risks associated with publishing a Debug build. To configure the build/package process for the Release configuration to include PDB files in Visual Studio: Open the web application's solution in Visual Studio.

Why is there a PDB files in release folder?

PDB files help you and the debugger out, making post-mortem debugging significantly easier. You make the point that if your software is ready for release, you should have done all your debugging by then.


1 Answers

After some digging around, it appears that project files for C# are stored in \program files\microsoft visual studio 9.0\common7\ide\projecttemplatescache\csharp\windows\1033. By adding <UseVSHostingProcess>false</UseVSHostingProcess> to the correct sections (there are separate sections for Debug and Release configurations) of the relevant templates, you can turn off the hosting process for all future projects of the selected types.

You should be able to handle the PDB issue in a similar way, but as I said I don't recommend turning those off, so I'll leave it as an exercise :)

This applies to VS2008, but my guess is that other editions have a similar scheme. In fact, VS2010 uses the same approach, but obviously the version number in the directory is 10.0 instead of 9.0.

like image 196
Brian Rasmussen Avatar answered Oct 10 '22 15:10

Brian Rasmussen