Skip to main content

Microsoft® “Roslyn” CTP

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 Visual Basic and C# compilers as APIs.  These APIs allow tools and end-users to share in the wealth of information the compilers have about code. The Roslyn CTP previews the next generation of language object models for code generation, analysis, and refactoring, and the upcoming support for scripting and interactive use of VB and C#.

Microsoft “Roslyn” June 2012 CTP Microsoft "Roslyn" September 2012 CTP

The Roslyn CTP installs on Visual Studio 2012. It includes previews of all the Roslyn APIs for both Visual Basic and C#, samples of using the APIs, and a C# Interactive window. This refresh from the June 2012 CTP includes an updated set of supported language features.

Note: This is a technology preview and there are known issues. While the shape of the public API is complete, only a subset of the VB and C# languages have been implemented at this time.

Microsoft "Roslyn" NuGet Package

Only the Roslyn Compiler and Services assemblies are distributed through the NuGet package. This allows consumption of the core APIs, but does not enable construction of any Visual Studio extensions or refactorings.

Note: The current license is for evaluation and preview purposes only and does not allow redistribution of the Roslyn binaries. Sharing of sample projects built on the Roslyn APIs is permitted, but sample users must have either the Roslyn CTP or the Roslyn NuGet package installed in order to build and run.

Featured Resources

 

Whitepaper: Roslyn Project Overview

Get an overview of how the Roslyn project exposes the Visual Basic and C# compilers’ code analysis.

 

Roslyn Project Overview Download

Download the Roslyn Project Overview.

Walkthrough: Getting Started with Syntax Analysis – VB | C#

Follow step-by-step instructions for navigating and analyzing syntax trees in both Visual Basic and C#.

Walkthrough: Getting Started with Semantic Analysis – VB | C#

Follow step-by-step instructions to do semantic analysis in both Visual Basic and C#.

Walkthrough: Getting Started with Syntax Transformations – VB | C#

Follow step-by-step instructions to transform syntax trees using both syntax and semantic analysis in Visual Basic and C#.

 

Walkthrough: Getting Started with Workspaces – VB | C#

Follow step-by-step instructions for using Roslyn with Visual Studio Solutions, Projects, and Documents.

 

Walkthrough: How To Write a Quick Fix – VB | C#

Follow step-by-step instructions for creating a custom code issue that is surfaced through the IDE and an automatic fix to correct it in both Visual Basic and C#.

Walkthrough: Executing Code in the Interactive Window - C#

Follow step-by-step instructions for getting started using the Interactive window to explore code snippets and their behaviors. Only the C# Interactive window is available at this time.

Walkthrough: Seeding the Interactive Window from a WPF Project - C#

Follow step-by-step instructions for using a WPF project to load context into the Interactive window.

Walkthrough: Introduction to Scripting - C#

Follow step-by-step introductions to the basics of the Scripting APIs and using the host execution engine in your .NET applications.

 

Walkthrough: Scripting a Paint-like Application - C#

Follow step-by-step instructions for enabling scriping in a fictitious Paint-like application and executing scripts in a custom execution context.

 

Roslyn Videos

The Roslyn Project - Meet the Design Team

In this video we meet the Roslyn Project design team (and the authors of The Roslyn Project technical paper), Anders Hejlsberg, Karen Ng, Matt Warren, and Peter Golde. We discuss why Roslyn matters, how it works (briefly – we’ll go deeper in the future), what it affords, and what it doesn’t enable.

BUILD: Anders – Future of C# and Visual Basic

In this talk, Technical Fellow Anders Hejlsberg looks into topics such as asynchronous programming, object models for code generation, analysis, and refactoring, and support for scriping and Interactive use of C# and Visual Basic.

Lang.NEXT 2012 – Going Deeper with Project Roslyn: Exposing the C# and VB compilers’ code analysis

In this information-packed session, Senior Program Manager Dustin Campbell explores six major Roslyn APIs in depth, showing how easy it is to leverage the APIs to analyze and generate source code, add scripting support to an application, or even extend the C# and VB language service features in Visual Studio.

MSR Faculty Summit 2011: Refactoring with Roslyn

Mike Barnet chairs this session at Faculty Summit 2011, which includes the following presentations:

Project Roslyn: Exposing the VB and C# Compilers’ Code Analysis
Karen Ng, Microsoft

Beyond Behavior Preservation
Ralph Johnson, University of Illinois, Urbana-Champaign

How Are Developers Using Refactoring Tools?
Emerson Murphy-Hill, North Carolina State University

Microsoft führt eine Onlineumfrage durch, um Ihre Meinung zur -Website zu erfahren. Wenn Sie sich zur Teilnahme entscheiden, wird Ihnen die Onlineumfrage angezeigt, sobald Sie die -Website verlassen.

Möchten Sie teilnehmen?