Installing PDB's with assemblies in the GAC

J

Jediah L

Is there a way to distribute for installation PDB files for assemblies that
are going into the GAC?

I've read info about the possibility of changing registry settings,
searching out assembly folders and manually copying the PDB's into the
folders, but I would like to be able to create a distribution package that
automatically installs the PDB's in the GAC location - so that when clients
get exceptions they can report good stack trace information.

Thanks!
 
R

Richard Grimes

Jediah said:
Is there a way to distribute for installation PDB files for
assemblies that are going into the GAC?

I've read info about the possibility of changing registry settings,
searching out assembly folders and manually copying the PDB's into the
folders, but I would like to be able to create a distribution package
that automatically installs the PDB's in the GAC location - so that
when clients get exceptions they can report good stack trace
information.

A PE file with symbols has a path in it to the symbol file. I've looked
at how StackFrame get symbols (including a search through SSCLI) and it
appears that it won't use this *path* but it does use the symbol file
name. So AFAIK the only solution is to copy the pdb to the GAC. I
thought I could trick gacutil to do this by compiling the library to
include the pdb as a linked resource:

csc /t:library /debug lib.cs
csc /t:library /debug:pdbonly /pdb:dummy.pdb lib.cs
/linkresource:lib.pdb

The rationale is that when an assembly is added to the GAC *all* files
that are part of the assembly are copied there. This trick did that, but
unfortunately the pdb file (lib.pdb in this example) was not used in the
stacktrace for exceptions. When I copied the last created pdb
(dummy.pdb) to the GAC the exception stacktrace used the symbols.

So in short, I don't know of any other solution

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top