Microsoft on October 18, made available a Community Technology Preview (CTP) test build of "Roslyn" compiler as a service technology.
The final release will be some time after Visual Studio 2012, officials are now confirming.
"'Roslyn' CTP installs as an extension to Visual Studio 2010 SP1. 'Roslyn' is a long lead project which we are considering for the post-Visual Studio 11 timeframe. The CTP includes an early preview of the APIs exposed by the C# and Visual Basic compilers, and the Interactive window experience," Microsoft stated on Download Center.
"Traditionally, compilers are black boxes -- source code goes in one end, and object files or assemblies come out the other end. The Roslyn project changes that model by opening up the VB and C# compilers. The compilers provide APIs to allow tools and end-users to share in the wealth of information the compilers have about code," the software gian said.
The Microsoft "Roslyn" CTP previews the new language object models for code generation, analysis, and refactoring, and the upcoming support for scripting and interactive use of C# and Visual Basic.
The CTP installs the following items:
- Visual Studio Project Templates
These project templates help you get started using the Roslyn APIs and building new Visual Studio extensions.
- Reference Assemblies
The Roslyn assemblies that can be added to projects via the Add Reference dialog.
- C# Interactive Window
A new tool window called C# Interactive is available in Visual Studio by invoking View -> Other Windows -> C# Interactive from the menu. You can explore by executing snippets of code in the C# Interactive tool window, cumulatively building up execution context as you experiment. In addition to typing directly into the tool window, you can also select code in C# and C# Script (.csx) files and invoke "Execute in Interactive" or "Copy to Interactive" from the context menu.
- C# Script File Editing Support
C# Script (.csx) files allow top-level statements much like the C# Interactive window. You can create a new C# Script file by invoking File -> New File -> > Script -> Visual C# Script from the Visual Studio menu. C# Script editing features like IntelliSense are powered by the Roslyn Language Service.
How to get started:
- Download the CTP. The CTP installs on Visual Studio 2010 SP1 and can be safely installed side-by-side with Visual Studio 11.
- Go to Start -> All Programs -> Microsoft Codename Roslyn CTP -> Getting Started to launch the entry point into all the documentation, samples, and tools.
- Read the Roslyn Project Overview for a good overview of the project.
- Learn from the rich samples included (paste as C#/VB, refactorings, code analysis, and code generation tools).
- Run the walkthroughs to learn about the Compiler APIs, the Services API, or using the Interactive window.
- For those of you that aren't extension writers, download the CTP to try out the Interactive window and use the Copy Paste C#/VB extensions that were built to help with your daily work now!
You can download Microsoft "Roslyn" CTP from the Microsoft Download Center.