No more PDB files at build

When you build a Visual Studio project, a file in generated in addition to the assembly. It has the same name but has a different extension: PDB for “Program Database”. This file contains all the debugging and state information of the project. It allows you, amongst others, to be able to break the execution at a breakpoint when you are debugging. Although those files are extremely important in development phases, they may be useless in release, depending on your deployment strategy. So it is interesting to now how to get rid of them at build. For this purpose, open your project’s properties page and go to the Build tab. At the bottom, the Output section owns an Advanced button (Figure 1).

project-properties-output

Figure 1

Click this button to open another window. The parameterĀ  is Debug Info. It has three options: none, pdb-only and full (Figure 2).

project-advanced-build-settings

Select none and save your changes. Congratulations, you got rid of PDB files!

Advertisements