分发.Net二进制文件和PDB的最佳方法是什么?

时间:2022-04-24 20:12:32

We altready have a similar question here but the discussion do not cover all the aspect, so I'm asking again:

我们这里已经有类似的问题,但讨论并没有涵盖所有方面,所以我再问一遍:

What is the best way to distribute a .Net application considering build mode (release vs. debug) and distribution of PDB files? Having a good reference to an article covering these aspects would be great.

考虑构建模式(发布与调试)和PDB文件的分发,分发.Net应用程序的最佳方法是什么?很好地参考一篇涵盖这些方面的文章。

Consider also the distribution of web application vs. the distribution of windows form applications.

还要考虑Web应用程序的分布与Windows窗体应用程序的分布。

Thanks in advance

提前致谢

Massimo

2 个解决方案

#1


3  

Debug builds should not be distributed, they're really for your own private viewing. However, once you build a release build with symbols and generate .pdbs from them, you can keep the pdbs and happily ship the dlls.

不应该分发调试版本,它们真的适合您自己的私人查看。但是,一旦您使用符号构建版本构建并从中生成.pdbs,您就可以保留pdbs并愉快地发布dll。

If you store the .pdbs in a symbol server (see this excellent bugslayer article) then you do not need to worry about which symbols match which version of the dll as the debugger handles that for you.

如果将.pdbs存储在符号服务器中(请参阅此优秀的bugslayer文章),那么您无需担心哪些符号与调试器为您处理的dll版本匹配。

If your app crashes, get DrWatson to generate a minidump (run DrWtsn32.exe check the minidump checkbox), get that dump sent to you, and then load it up in windbg. It'll show you the exception, stack trace, variables, registers, threads, the lot (well, not the lot, for that you need a full crashdump but they are reasonably large, minidumps have all useful information at a fraction of the size).

如果您的应用程序崩溃,请让DrWatson生成一个minidump(运行DrWtsn32.exe检查minidump复选框),将该转储发送给您,然后将其加载到windbg中。它会向你显示异常,堆栈跟踪,变量,寄存器,线程,批次(好吧,不是很多,因为你需要一个完整的故障转储,但是它们相当大,minidumps只有一小部分的所有有用信息)。

#2


0  

Debug builds should not be distributed - you likely do not have the rights to do so. PDBs are most easily distribute using a Symbol Server.

不应分发调试版本 - 您可能没有权限这样做。使用符号服务器最容易分发PDB。

#1


3  

Debug builds should not be distributed, they're really for your own private viewing. However, once you build a release build with symbols and generate .pdbs from them, you can keep the pdbs and happily ship the dlls.

不应该分发调试版本,它们真的适合您自己的私人查看。但是,一旦您使用符号构建版本构建并从中生成.pdbs,您就可以保留pdbs并愉快地发布dll。

If you store the .pdbs in a symbol server (see this excellent bugslayer article) then you do not need to worry about which symbols match which version of the dll as the debugger handles that for you.

如果将.pdbs存储在符号服务器中(请参阅此优秀的bugslayer文章),那么您无需担心哪些符号与调试器为您处理的dll版本匹配。

If your app crashes, get DrWatson to generate a minidump (run DrWtsn32.exe check the minidump checkbox), get that dump sent to you, and then load it up in windbg. It'll show you the exception, stack trace, variables, registers, threads, the lot (well, not the lot, for that you need a full crashdump but they are reasonably large, minidumps have all useful information at a fraction of the size).

如果您的应用程序崩溃,请让DrWatson生成一个minidump(运行DrWtsn32.exe检查minidump复选框),将该转储发送给您,然后将其加载到windbg中。它会向你显示异常,堆栈跟踪,变量,寄存器,线程,批次(好吧,不是很多,因为你需要一个完整的故障转储,但是它们相当大,minidumps只有一小部分的所有有用信息)。

#2


0  

Debug builds should not be distributed - you likely do not have the rights to do so. PDBs are most easily distribute using a Symbol Server.

不应分发调试版本 - 您可能没有权限这样做。使用符号服务器最容易分发PDB。