如何在 MSI 安装程序中包含 pdb 文件以与应用程序的其余部分一起部署?
如何在 MSI 安装程序中包含 pdb 文件以与应用程序的其余部分一起部署?
我想在我们生成的错误日志中保留行号和完整的堆栈跟踪。
更新
除非您分发 pdb,否则代码的行号不会在堆栈跟踪中报告,我已经对此进行了测试。
当我构建 MSI 并要求 MSI 安装程序项目包含各种项目输出(大约 5 个)时,如何才能将这些项目输出的 pdb 包含在 MSI 中?或者如何将此信息(代码行号)从异常 ex 获取到日志中?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于 Visual Studio 部署项目,您应该执行以下操作:
添加 ->项目产出->调试符号
还要确保在每个项目构建配置中启用 *.pdb 生成。
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.
我知道这对OP来说有点晚了,但我发现之前的答案需要更多澄清(至少对我来说)。对于VS2010,当点击添加->项目产出->调试符号,您需要在下拉列表中指定项目,然后按住 Ctrl 键并单击该项目的“调试符号”。对您拥有的所有项目执行此操作,这将需要您单击“添加”->“项目产出->每次调试符号。
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.
对于较新版本的 Visual Studio,您可以使用“项目属性”>“部署”下的选项在部署时包含 .pdb 文件。打包/发布 Web,取消选中“排除生成的调试符号”复选框,您的 .pdb 文件将被发布。
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.