C# release version has still .pdb file

If you want to disable pdb file generation, you need to use the "Advanced build settings" dialog available in project properties after clicking the "Advanced..." button" located in the lower part of the Build tab.

Set Output - Debug info: to None for release build configuration and no pdb files will be generated.


The default is to generate PDBs for release builds as well. That is a feature and you shouldn't disable it. Generating PDBs means you can get more information when debugging. The performance of the code is not affected in any way by the presence of PDB files.


You don't have to ship the .PDBs with your release deployment, but they are useful to keep around - for example you can remotely debug the code running on a different machine using the PDBs on your machine to get the line numbers of where exceptions occur.

Without the use of the .PDBs, line numbers and file names are not included in stacktraces so it makes it much harder to debug them.