It’s great to finally have the .NET sourcecode for debugging purposes – inconveniently it’s in a format you might have your difficulties just browsing along. A little tool is here to help!
After you installed, let’s say the WCF sourcecode and debug symbols you get a directory structure similar to this:
This source.zip.tmp file holds the whole sourcecode as one big package. It can’t be unpacked – even one would suggest that by just looking at that .zip ending in the name of the file.
Instead this is a plain-text file of a certain yet simple format. I wrote me a little tool to unpack this file into it’s original files and directories.
You can get the little tool, including sourcecode, here: UnpackMSSources.zip
To start the magic, you would like to go to the command line and start the tool with two parameters. Parameter 1 is the path and filename of the source.zip.tmp file. Parameter 2 is the part of the Path that needs to be cut-off. For the WCF Sources it’s “/DEVDIV/depot/DevDiv/releases/Orcas/SP/ndp/cdf/src/” for example.
The tool will then start to whirl through the file and extract all the files it founds into directories it’s creating along the way. After some seconds you would end with a directory tree like this:
Source 1: http://referencesource.microsoft.com/netframework.aspx
Source 2: http://www.schrankmonster.de/content/binary/UnpackMSSources.zip