Tech Dreams

Team Foundation Server– Debug symbols(pdb files) generated in Release build? Fix it.

Yesterday I setup TFS for my .NET playground website to implement continuous integration and deployments. After a successful build I noticed that debug symbols(pdb files) were generated even though TFS is configured to build in Release mode.  After a bit of analysis its turned out to be the behavior of TFS to generate debug symbols (pdb files) until we pass the attribute DebugType = None. Here are the steps to pass DebugType parameter to MSBuild of TFS

  1. Go to Team Explorer
  2. Select Build Defintion >> Edit Build Definition
  3. Switch to Process tab
  4. Navigate to Advanced Section and locate MSBuild Arguments
  5. Add the following: /p:Configuration=Release /p:DebugType=none

tfs_specifying_msbuild_supress_debug_pdb_files