Welcome to MSDN Blogs Sign in | Join | Help

Making .NET Framework Source Available to Developers

For any of you that have been following my blog, you may remember that I made a splash with a post about possible ways to release Windows Forms source code.  This generated a lot of discussion and was picked up by many of the major tech websites out there.  That was in February of 2005.

Between now and then, I've taken a new role in the company and had other things (like shipping VS 2005 and getting the AJAX Control Toolkit off the ground) keeping me busy, but earlier this year I started to get much more focused on this idea and pulling together a plan to make it happen.

Today is an exciting day for us here Microsoft and our developers, see ScottGu's Blog for the big announcementWe will be releasing .NET Framework Source Code as part of the VS 2008 (Orcas) release.

Also check out the Podcast on Scott Hanselman's "Hanselminutes" that I did as well - lots more detail in there.

That's right.  Getting code ready for release is a big job, and most teams are still focused on getting Orcas itself released, but the current launch lineup is (in no particular order):

  • Base Class Libraries (mscorlib.dll)
  • ASP.NET (System.Web.dll)
  • Windows Forms (System.Drawing.DLL & System. Windows.Forms.dll)
  • ADO.NET (System.Data.DLL)
  • XML (System.Xml.DLL)
  • WPF (System.Windows.DLL)

There may be others as well, but that's what we've currently got a lock on for the initial rollout.  The system is setup so that it's easy for us to publish code, so more will get added as time goes on (working on getting LINQ, WCF, and Workflow in there as well).

Scott's Blog has details and screen-shots, but here's some more detail on how it works.

My main goal had been to enable a scenario that we're all familiar with...

You're up late one night writing code.  Maybe it's a technology you're just learning or something you haven't tried before.  You're getting an exception from deep in the code.  You can't figure out why...the blogs aren't helping, the newsgroups aren't helping, the docs aren't helping.  The next day you call product support.  Since they don't have your code in front of them, it's also hard for them to triangulate what's going on.

Now, imagine you've got source and symbols available.  With that, you can enable "Break on Exception" in  your debugger, run your scenario, and have the debugger stop exactly where the exception was thrown.  The code gets loaded up and you sniff around a bit and realize - duh! - you forgot to set some other piece of state in an earlier call or a parameter.  You fix your code and you're off and running. 

Even with one of the decompilers (e.g. Reflector) that you can easily get out there, this can be tricky to solve.  With the source it's much, much easier.

One of the big challenges here was building as system that didn't require each team to build their own process, installer, etc.  And we also had to account for updated releases (Service Packs, etc) so that this didn't become a big tax over time.  On the customer side, we also didn't want developers to have to wade through a bunch of choices to find the "right" source & symbols for their install, then have to manually install it and set it up, etc. 

It had to just work.

Fortunately, the technology needed to make that happen already existed within the company.  We already have a unified place where all the symbols get pushed, and a unified way to get the source that matches those symbols.  What's more is that on the server-side, it's just a plain HTTP file server based on IIS.

So a few months ago I started pulling together resources from across the company to help get this to happen.  People really rallied around this and I got great support from teams across the company - on the VS side willing to do the work to make the VS Debugger understand how to get these files, on the Windows Debugger SDK side the technology to actually retrieve the symbols and source from an HTTP location, on the MSDN/Code Center side helping build out the server-side that will make all of this available when we launch later this year, and on the management side getting behind this effort and supporting it.  It's been great and those teams really are the ones that made this possible.

The experience really is fantastic.  There's a screenshot on Scott's blog for setting the options in the Tools/Options/Debugger dialog in Visual Studio 2008.  That's pretty much all you need to do.  Please note the URL in there is still TBD - that's an example.

All VS needs to know his where the symbols are and the rest happens automatically.  When you launch your process, VS can go look at a variety of locations for the symbols to match your binaries - it knows how to tell. So one of the places it can look will be on the MSDN server for this stuff (note this is separate from the current symbol server that's out there - these symbols will have the full information in them like line numbers and variable names).  Once it finds the symbol file, it downloads it to the local cache.  Now, the symbol file has the pointers to the source files in it.  So when you hit a call frame - the debugger checks the symbols file and gets the path to the exact right source file and retrieves that.  Moreover, as we release source and symbols for new parts of the product (or new products - this system works for anything) or product updates, they'll just be automatically available for use in a debugging session.  No configuration or extra steps needed.  Very nice.

 dlprocess

It's just that easy - you can step through, set breakpoints, inspect variables, etc.  It's goodness, looking forward to making this available later this year!

Published Wednesday, October 03, 2007 6:30 PM by sburke
Filed under:

Comments

# Techy News Blog » Making .NET Framework Source Available to Developers

# re: Making .NET Framework Source Available to Developers

This is huge. Thanks so much, Shawn, for pushing this idea and making it happen. It makes the millions of developer lives around the world just a little bit easier. :-) Thanks man.

Wednesday, October 03, 2007 2:21 PM by JudahGabriel

# re: Making .NET Framework Source Available to Developers

Hey Now Shawn,

I heard you on Hansel Minutes, it was a good show & it's good to see the Framework source is going to be available.

Thx,

Catto

Wednesday, October 03, 2007 3:59 PM by ccatto

# i'm all smiles today : sharing the source code for .NET 3.5 libraries

Viva transparency, openness! Today we are announcing that release of source code for the .NET 3.5 Framework

Wednesday, October 03, 2007 4:28 PM by Artificial Ignorance - Anand Iyer's Blog

# re: Making .NET Framework Source Available to Developers

That's fantastic Shawn - I've been looking forward to this ever since you first started talking about it, it's going to make debugging much easier...

Wednesday, October 03, 2007 4:37 PM by prwilde

# Microsoft to release .NET Framework Library Source Code

Scott Guthrie just made an exciting post , starting with .NET 3.5 and VS 2008 the .NET libraries will

Wednesday, October 03, 2007 5:52 PM by Maor David's Blog

# Hanselminutes Podcast 83 - Microsoft to release .NET Framework Libraries Source

Wednesday, October 03, 2007 7:55 PM by Scott Hanselman's Computer Zen

# Hanselminutes Podcast 83 - Microsoft to release .NET Framework Libraries Source

Wednesday, October 03, 2007 7:55 PM by Scott Hanselman's Computer Zen

# Shawn Burke : Discussing the Release of .NET Source Code

Matt Winkler and David Tesar catch up with Shawn Burke to talk about the announcement today that the

Thursday, October 04, 2007 12:34 AM by Noticias externas

# New for VS2008 - debugger support for .Net frameworks support

ScottGu just posted info on something our team has been working on in conjunction with Shawn Burke (NDP)

Thursday, October 04, 2007 2:01 AM by joc's bLog

# re: Making .NET Framework Source Available to Developers

Shawn - congratulations on this release! I remember you were pushing for this a couple of years ago and it seemed like a great win-win goal. Glad to see you were able to pull it off!

Raghavendra

Friday, October 05, 2007 5:37 AM by rprabhu

# Hanselminutes Podcast 83 - Microsoft to release .NET Framework Libraries Source

Yes, you read that correctly. Microsoft is releasing the source code to a bunch of .NET Framework Libraries

Monday, October 08, 2007 4:10 PM by ASPInsiders

# .Net Framework 3.5 source code freely available!

Scott Guthrie announced that the source code for the .NET framework is being released! Shawn Burke...

Sunday, October 14, 2007 10:00 PM by Musings of a Developer

# OSI Approves Microsoft Shared Source Licenses

On Friday, the OSI approved two of the Shared Source licenses that Microsoft uses, saying that these

Wednesday, October 17, 2007 4:04 PM by Shawn Burke's Blog

# Growing the family

It's a boy! No, no, no not that. If you're a SubSonic fan, you may have seen Rob Conery's blog today

Friday, October 26, 2007 8:25 PM by Shawn Burke's Blog

# .Net Framework Source Code Released

Wednesday, October 03, 2007 10:58 PM undefined undefined announced on ScottGu's Blog at: ht undefined

Monday, January 07, 2008 9:22 PM by Eric Brandt's
Trail of Bre@dcrumbs

# .Net Framework Source Code Released

Wednesday, October 03, 2007 10:58 PM The .Net Framework 3.5 Source Code will be released later this year

Monday, January 07, 2008 10:13 PM by Noticias externas

# ScottGu on releasing the source code for .NET 3.5

Scott has announced that the source code for the .NET Framework 3.5 will be released around the same

Friday, February 01, 2008 5:22 AM by dave^2=-1

# re: Making .NET Framework Source Available to Developers

I completely agree with all that here is told

Sunday, April 06, 2008 7:32 AM by Rapidshare
Anonymous comments are disabled
 
Page view tracker