Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

This question already has an answer here:

...or do I need Studio to view it?

share|improve this question
 
I think the short answer is: Yes, you gotta use VS. –  Yoopergeek Sep 25 '09 at 18:37
2  
downloads available at referencesource.microsoft.com/netframework.aspx (in .msi installer format) –  Maslow Feb 10 '11 at 22:17
2  
This is the correct answer for the OP's question, here is an online .NET source-code library. –  Shimmy May 5 '12 at 21:53

marked as duplicate by Shimmy, Ted Hopp, duDE, thaJeztah, Jean Apr 21 at 19:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

8 Answers

up vote 14 down vote accepted

There are several ways to look at source code from the .NET framework and the BCL (or approximations to it). All of them can be used independently of Visual Studio (with varying degrees of difficulty), if you want.

share|improve this answer
 
The wintellect.com/CS/blogs/jrobbins/archive/2008/02/06/… link is broken. –  Ryan Gates Apr 19 at 0:07
 
@RyanGates: Thanks. I can't find an exact replacement but I have replaced with something similar. –  Jeff Yates Apr 19 at 3:42

I came across this thread just recently looking for the exact same thing. It was frustrating to find there wasn't any online version available.

Luckily, I believe I found a good source which seems to provide a lot of the .NET classes for online viewing.

Even though this question is quite old I will provide this for anyone who comes looking here just like I did.

share|improve this answer

The code for much of the .NET Framework libraries have been released:

http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx

[Edit] I'll be the 1st one to say: I LOVE .NET Reflector, but it emits decompiled intermediate language, NOT original source code. I highly recommend Reflector but it's very important to remember the true nature of what you're viewing with it.

share|improve this answer

You can view library source code if you have the framework DLLs and .NET Reflector. This is likely to be the easiest solution if you can not find it online.

share|improve this answer
2  
Reflector is a very important tool that any .NET developer should keep in their toolkit, but be mindful that you're looking at a decompilation of the IL, not the actual source code. See Dinah's answer for the real source code. –  Yoopergeek Sep 25 '09 at 18:36
2  
Keep in mind that it's no longer free. –  Shadow Wizard Oct 23 '11 at 13:32
1  
A free alternative is ILSpy from the Mono project. –  LTR Jul 16 '12 at 6:31

please see this URL: http://labs.developerfusion.co.uk/SourceViewer/browse.aspx?assembly=SSCLI CLI online source code viewer is it something you were looking for?

share|improve this answer

The .Net framework isn't open source, so being online isn't the limiting factor here.

You can use Reflector to decompile pieces of it or look at Mono for an open source re-implementation and neither requires Visual Studio.

Is there a reason that you want to look at the framework's source?

share|improve this answer
 
most of the class libraries are open source (i.e. you can view the actual source code). Indeed, this has been so since MS released rotor code more than 10 years ago. For a few years, MS has extended the portion of the open source code considerably, including things like WCF and some of their recent compilers. It is just not free –  Kemal Erdogan Mar 14 at 8:34
 
@KemalErdogan the BCL wasn't open sourced until June 2010 or so. Rotor indeed released some source, but not the whole of the framework. –  48klocs Mar 15 at 16:41
 
nope, rotor source was opened in 2002. check this link out: en.wikipedia.org/wiki/… –  Kemal Erdogan Sep 11 at 20:38

Maybe this could help: reflector

share|improve this answer

All you need to do is enable stepping into framework code:

Tools->Options->Debugging->Enable .Net Framework Source Stepping

This will entail you setting up a Symbols directory (Tools->Options->Debugging->Symbols). I use C:\Symbols

Then, once you've enable the option, the first time you debug an app, it will download all relevant symbols and debug info from Microsoft to the specified directory.

After that, you can step into framework code as if it were your own (although you can't edit it ofc.)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.