开发者

Adding source code to dll when releasing

开发者 https://www.devze.com 2023-01-20 06:25 出处:网络
I have a dll which gets used by a lot of people in our team - I want them to be able to build against that but also be 开发者_如何学Pythonable to step into and click into the source code if they want

I have a dll which gets used by a lot of people in our team - I want them to be able to build against that but also be 开发者_如何学Pythonable to step into and click into the source code if they want to see how it is written

I can see that is possible with the MSDN dlls - How do they do that


The technology you're looking for is "Symbol server" and within that, "Source server".

See Symbol Server and Symbol Stores for more information.


You need to setup a symbol server that will hold the debugging symbols and source code.

See here for more details on setting one up for your team.


Although the source code is not embedded in the assembly itself, I believe what you are after is a symbol server (created using the Symstore utility)

A symbol store is a database that allows debuggers to look up the correct symbols to use for any given module - very useful stuff if you ship / debug many different versions of the same assemblies.

With some extra magic you can also embed source control information inside your symbols, so that any compatible debugger also automatically knows enough information to retrieve the exact source used to build that module.

As I said however - the source code itself is not embedded in the assembly, merely the information required to allow the debugger to retrieve the source.

There is an excellent guide on how to do all of the above:

  • Setting up a Symbol Server


You need to setup and configure : 1) source server 2) symbol server 3) setup "Debugging Tools for Windows" enter link description here . After build dll, you need indexing your code with script "svnindex". For more details, read \Program Files\Debugging Tools for Windows\srcsrv\srcsrv.doc

0

精彩评论

暂无评论...
验证码 换一张
取 消