How to Decompile an Assembly in the GAC


I had an issue, recently, in which I needed to know what version of a method was inside an assembly that had been installed in the GAC.  Since this dll was being referenced by SSIS, we had to keep the version number the same with each deployment, so we could not know easily looking only at the properties of the file.

Ed Bunt from my team suggested using this tool, which turned out to be pretty sweet:  dotPeek by TeamCity.

Once installed, you can open a dll in a directory or directly from the GAC.  It looks like this:

This is also very handy if you inherit compiled code without the source.
One thing to keep in mind is that the assembly gets cached, so if the dll is recompiled, you should clear the list and restart the app before looking at it again.

Mark Wojciechowicz