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?
pdb file stores all debug information for the project's .exe file, and resides in the \debug subdirectory. The <project>. pdb file contains full debug information, including function prototypes, not just the type information found in VC<x>. pdb.
No, you don't have to deploy the . pdb file. To quote from MSDN, "A PDB file is created when you build with /debug (Visual Basic/C#).", so it shouldn't be creating the debug database when compiling for release.
Open Settings: Tools->Options -> Debugging -> Symbols and add directory, where your . PDB files are located. You can add custom path, like for each project, and also you can edit common path, where Visual Studio will save all .
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With