Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio mscorlib classes source code

In NetBeans using Java I can open java.lang.String class and I see that class source code. If I try to open System.String class in VisualStudio I see methods signatures only. Is it possible to install VisualStudio plug-in or something like that to open mscorlib classes source code pressing F12?

Thanks for your answers. I've found the best solution for me: http://visualstudiogallery.msdn.microsoft.com/95789cdb-08f9-4dae-9b2f-fc45a452ad77

like image 225
kletnoe Avatar asked Oct 10 '12 10:10

kletnoe


3 Answers

What you want is at "Microsoft Reference Source Code Center", with the .NET Library sources at http://referencesource.microsoft.com/.

like image 81
AMissico Avatar answered Sep 23 '22 05:09

AMissico


While the previous answers are good, you have a better option now: Microsoft has open-sourced .NET, and not only that, all of it is available at GitHub.

Also, it's now possible to configure Visual Studio to check referencesource.microsoft.com while debugging.

like image 28
Bruno Brant Avatar answered Sep 24 '22 05:09

Bruno Brant


What you are asking for can be achieved by using dot peek from Jetbrains.

Jetbrains offer some other cool software too, like Resharper which can have dot peek included and you can navigate to the decompiled sources.

enter image description here

You can get the actual source code, not decompiled, from the symbol files which is the option beneath the one I have highlighted, you would need to do what the other answer says by setting up your symbol server.

UPDATE: See Bruno Brants answer.

like image 28
Mr. Mr. Avatar answered Sep 24 '22 05:09

Mr. Mr.