Microsoft Announces Preview Of .NET Compiler Platform Codenamed “Roslyn”, Code Available As Open source

3

Roslyn

At Build 2014 day 2 keynote, Microsoft shared a number of new innovations for .NET developers. They announced the preview of the .NET Compiler Platform codenamed Roslyn. It provides open-source C# and Visual Basic compilers with rich code analysis APIs. You can build code analysis tools with the same APIs that Microsoft is using to implement Visual Studio. This is also available as open source, enabling new scenarios for .NET and Visual Studio developers.

What is Roslyn?

Traditionally, compilers are black boxes — source code goes in one end, magic happens in the middle, and object files or assemblies come out the other end. As compilers perform their magic, they build up deep understanding of the code they are processing, but that knowledge is unavailable to anyone but the compiler implementation wizards. The information is promptly forgotten after the translated output is produced.

For decades, this world view has served us well, but it is no longer sufficient. Increasingly we rely on integrated development environment (IDE) features such as IntelliSense, refactoring, intelligent rename, “Find all references,” and “Go to definition” to increase our productivity. We rely on code analysis tools to improve our code quality and code generators to aid in application construction. As these tools get smarter, they need access to more and more of the deep code knowledge that only compilers possess. This is the core mission of the .NET Compiler Platform (“Roslyn”): opening up the black boxes and allowing tools and end users to share in the wealth of information compilers have about our code. Instead of being opaque source-code-in and object-code-out translators, through the .NET Compiler Platform (“Roslyn”), compilers become platforms—APIs that you can use for code related tasks in your tools and applications.

The transition to compilers as platforms dramatically lowers the barrier to entry for creating code focused tools and applications. It creates many opportunities for innovation in areas such as meta-programming, code generation and transformation, interactive use of the C# and VB languages, and embedding of C# and VB in domain specific languages.
The .NET Compiler Platform (“Roslyn”) SDK Preview includes the latest drafts of new language object models for code generation, analysis, and refactoring. We hope to include drafts of API support for scripting and interactive use of C# and Visual Basic in a future preview. This document provides a conceptual overview of the .NET Compiler Platform (“Roslyn”). Further details can be found in the walkthroughs and samples included in the SDK Preview.

More details on it can be found at http://roslyn.codeplex.com/

About Author

Pradeep, a Computer Science & Engineering graduate.

  • MSFTmanJosh

    Why is this website so horrible on mobile? I’m not trying to bash but seriously.

    • http://flickr.com/daiax DaiaX

      Maybe we should send email to our beloved WMPowerUser and Microsoft-News Pradeep, Surur and Suril Amin. At least we trying, who knows.

    • José Villaró

      Only on mobile? I’m not trying to bash but seriously.