16

How to include pdb files in MSI installer to deploy along side the rest of the app?

I want to keep the line numbers and full stack trace in error logs we generate.

Update

The line numbers of the code are not reported in the stacktrace unless you distribute the pdb's, I've tested this.

How can when I build the MSI and I've asked the MSI installer project to include various project outputs (about 5) to also include the pdb's of those project outputs in the MSI? or how to get this information (code line numbers) from the Exception ex into the logs?

SamB
  • 9,039
  • 5
  • 49
  • 56
m3ntat
  • 3,635
  • 11
  • 38
  • 50

3 Answers3

19

For a Visual Studio Deployment Project you should do:

Add -> Project Output -> Debug Symbols

Also make sure that the *.pdb generation is enabled in each project Build configuration.

João Angelo
  • 56,552
  • 12
  • 145
  • 147
3

I know this is a little late to the OP, but I found that the previous answer needed more clarification (at least for me). For VS2010, when you click Add -> Project Output -> Debug symbols, you need to specify the project in the drop down, and then ctrl+click the "Debug Symbols" for that project. Do this for all the projects that you have, which will entail you clicking Add -> Project Output -> Debug Symbols each time.

terryg
  • 81
  • 1
  • 4
0

For newer versions of Visual Studio you can include .pdb files on deploy using the option under the Project Properties > Package/Publish Web, uncheck the checkbox "Exclude generated debug symbols" and your .pdb files will be published.

Marcello
  • 1,099
  • 14
  • 18