Friday, April 18, 2014

How to disable generating .PDB files while compiling .NET assembly/ website in Release mode

While compiling your .NET assembly or publishing ASP.NET or MVC project in Release mode, you may observe .pdb file also gets generated along with necessary .dll or supporting files.
PDB file contains debugging information and symbol which does not make any sense during deployment or release of a product.
In order to get rid of generating PDB files during publish/ build -
1. Open the project properties of a project in Visual Studio
2. Click on "Build" tab
3. Make sure the configuration selected is "Release"
4. Click on "Advanced" button
5. Select "none" in "Debug Info" selection box.
6. Click OK, and save the project
Try building the project, and you will not see PDB files.

Screenshots:



2 comments:

Thanks for visiting my blog.
However, if this helped you in any way, please take a moment to write a comment.

Thanks
Nirman