Answer: Firstly lets be clear IMHO the .Net GAC is evil (actually more like eeevvvviiillll), and if you have a chance please be nice to your self and avoid it! Don’t be fooled by its ‘only one place’ on your system pledge – remember it is EVIL!
However in a number of cases it is not possible to do this (predominately because of other peoples choices), so there is a excellent article written by the guru John Robbins here http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/05/11/pdb-files-what-every-developer-must-know.aspx . This article is excellent in so many ways that you should just go and read it. But it shows a problem that I know developers have struggled and worked around in their own unique way – how to get the PDB’s into the GAC, search for DEVPATH in the article if you feel compelled to just find the answer rather than read the entire article or have a look at this article (http://msdn.microsoft.com/en-us/library/cskzh7h6(loband).aspx).
Q: Can I override the GAC so I can load my specific module first?
A: Frankly the GAC is so ugly/evil predominately because people rarely have the correct versioning scheme applied to their assembly’s, and more importantly the GAC takes providence over any local assembly’s. This means even if you have the correct version in your local xcopied folder, if there is a older version (same .Net File version but different code) in the GAC – that version will get used!! So trying to update a single process (as opposed to the entire machine) to try a new version is a pain as you have to update the entire system by updating the GAC. Obviously that has the potential to destabilize an entire system (generally considered bad on production machines) rather than just one process. It seems DEVPATH actually enables the applications to load the information from the DEVPATH BEFORE the GAC. So if this works as advertised, you can make a targeted change to an application using a GAC assembly with DEVPATH. You will note there are downsides to using the DEVPATH – specifically you lose all versioning capabilities – but for pinpoint testing that isn’t a major issue.
Very handy to know!
Gareth