I downloaded the .NET Framework source code from here http://referencesource.microsoft.com/netframework.aspx.
Since I am working with .NET 4.0, I chose ".Net/4" from the list. (What is ".NET/8.0" in that list? No idea.)
I wrote some scripts to rearrange the bloody mess they give us:
- Into a reasonable hierarchy of directories;
- To remove duplicated code (why is every file doubled, or was my install bad?);
- Rename all top-level namespaces to not conflict with native ones baked into Intellisense.
- Example: System.Windows.Controls -> xSystem.Windows.Controls
Then follow these steps:
- Create a new Visual Studio project of type "Class Library"
- Remove all references -- yes, even the system ones.
- Drag/drop all of your massaged .NET code into the root of your project.
- Wait about 30 minutes for VS processing. VS will appear to freeze; be patient.
Intellisense/ReSharper still complains about heaps of problems, but now I can right click and select "Go to Declaration/Implementation".
Visual Studio is about 600MB with this project loaded.