News

.NET Framework Reference Source Updated Via 'Roslyn'

Developers can search for incompatibilities between their own code and .NET more easily than ever.

Have you ever upgraded to a newer version of Microsoft's .NET Framework, and suddenly found that one of your applications started acting buggy, or quit working altogether? It was very likely due to changes made in the .NET source code, and forced developers to spend long hours combing through code -- both their own and Microsoft's, in many cases -- to spot the changes.

Microsoft is working to change that. It has long had its .NET source code open to the public -- since 2007, reports Principal Program Manager Scott Hanselman on his blog -- but its value was limited because of infrequent updates. Officially called the ".NET Reference Source," it's being replaced by a newer version using the "Roslyn" compiler-as-a-service technology. Using Roslyn, Hanselman writes, generates "...a complete syntactic and semantic index of the .NET Framework Sources." The upshot is that every time the .NET Framework is updated, the .NET Reference Source will be updated as well.

Not only will the .NET source code be updated as often as .NET itself, but other updates will make it integrate better with Visual Studio. Alok Shriram, Program Manager on the .NET Framework team, wrote that well-known developer Schabse S. Laks has written a Visual Studio plug-in called "Ref12" that enables access to the .NET Framework Source by pressing F12 within the IDE (note that this is currently available only for C#; Visual Basic isn't supported, although Laks indicated a willingness to make it available, if it's requested.)

For those not working in Visual Studio, the .NET Framework Source can still be searched within a Web browser with a tool that gives "Go to Definition" and "Find All References"-like functionality. The .NET Framework Source is also available as a zip file, so developers wanting to work offline can still use it (it can be opened in Visual Studio).

Shriram explained how the new process will work:

"Starting with .NET 4.5.1 we have radically changed the symbol indexing and publishing process to be in sync with the build process such that as and when updates are shipped , the corresponding PDBs (Program Databases) are also updated to the reference source site appropriately. The summary of this is going forward the reference source debugging experience should just work."

The new .NET Framework Source site is still in beta; Hanselman blogged that it will "soon" replace the existing Source site.  

Roslyn is the project to fully rewrite the Visual Basic and C# compilers and language services (i.e. the language editing experiences) in their own respective managed code language; Visual Basic was rewritten in Visual Basic, and C# was rewritten in C#. It was officially enabled last December, according to Matt Gertz, the Visual Studio Managed Languages Development Manager. He wrote that the daily builds of Visual Studio are now compiled using Roslyn.

Roslyn exposes information regarding source code parsing (what elements are present in code), semantic analysis (what they mean), binding (how they relate to each other), and IL emitting (executable code).

About the Author

Keith Ward is the editor in chief of Virtualization & Cloud Review. Follow him on Twitter @VirtReviewKeith.

comments powered by Disqus

Featured

  • VS Code 1.125 Adds Copilot Spend Meter After Billing Shock

    VS Code 1.125 adds in-editor visibility into additional Copilot budget usage as GitHub's AI-credit billing model continues to draw developer scrutiny.

  • TypeScript 7.0 RC Moves Microsoft's Go Rewrite Into the Mainline Compiler

    Microsoft's Go-based TypeScript rewrite has reached Release Candidate status, moving from a separate native-preview package into the regular TypeScript npm package while leaving some ecosystem-facing API work for TypeScript 7.1 or later.

  • Microsoft Highlights Visual Studio Live! Event Lineup and Longtime Developer Community Role

    A Microsoft MVP Blog post on Visual Studio Live!'s longevity arrives as the 2026 conference series continues with upcoming stops at Microsoft HQ, San Diego and Orlando.

  • Using Local AI to Cut Copilot Usage-Based Billing Shock

    After being gobsmacked by the new billing plan using almost all my monthly credits in one or two days, I tried pushing some Copilot-style coding work onto local models in VS Code. What I found was less "free AI" and more "pick your pain": cloud charges on one side, heavy local resource use and long waits on the other.

Subscribe on YouTube