Roslyn September 2012 CTP

09/20/2012 07:55:01 By Felipe Pessoto

Mais uma atualização do projeto Roslyn. Agora a maior parte da análise semântica do C# e VB.NET está pronta. Quase todo o C# 3 está implementado, faltando ainda o suporte a dynamic do C# 4 e async/await do C# 5. Também foram feitas várias alterações nas API´s.

Para dar seu feedback, tirar dúvidas e relatar bugs pode usar o Fórum do Roslyn ou o Connect.

O download pode ser feito por este link, ou usando o package do NuGet que contem as API´s que não dependem do Visual Studio.

Mais detalhes sobre a atualização:

New Language Features Implemented Since June 2012 CTP

Implemented in C#

  • Collection initializers
  • Extern aliases
  • Expression trees
  • Multi-dimensional arrays
  • Nullable types
  • Object initializers
  • Type forwarders
  • Unsafe code (except fixed-size buffers)

Implemented in Visual Basic

  • Array literals
  • Collection initializers
  • External method declarations (Declare)
  • Handles clauses
  • Late-binding
  • Nullable types
  • Object initializers
  • Operator overloading
  • ParamArray parameters
  • Partial methods
  • Shared constructors
  • User-defined conversions
  • With statements
  • XML literals

API Changes Since June 2012 CTP

There have been some updates to the Roslyn APIs since the second CTP was released in June of 2012. Below is a summary of some of the most important changes, some of which are breaking.

Compiler APIs

  • SyntaxTree.ParseCompilationUnit has been removed. Use ParseText or ParseFile instead.
  • SyntaxNode.GetText and SyntaxNode.GetFullText have been replaced with  ToString and ToFullString respectively.
  • Elastic SyntaxTrivia has been removed. Elasticity is now represented with an Elastic SyntaxAnnotation on the trivia.
  • AssemblyNameReference, AssemblyFileReference, and AssemblyObjectReference have been removed and replaced with a family of classes derived from a new abstract class, MetadataReference. Use the MetadataReference.CreateAssemblyReference factory method or the constructors of the MetadataReference derived types to create references.
  • CompilationOptions.Default has been removed. Use the CompilationOptions constructors instead.
  • The Control Flow Analysis API has been changed to reflect region entry and exit points instead of TextSpan start and end points. The JumpsIntoRegion and JumpsOutOfRegion collection properties have been removed and replaced with EntryPoints and ExitPoints collection properties.

Services APIs

  • Several APIs have been relocated from the Editor Services layer to the Services layer. Note that this change necessitated several changes to the APIs themselves to remove dependencies on the Visual Studio editor.                        
    • Classification
    • Code Actions
    • Completion (i.e. completion lists)
    • Rename

Editor Services APIs

  • Several APIs have been relocated from the Editor Services layer to the Services layer. See the Services API changes for details.

Known Issues

No Visual Basic Interactive Support

The Interactive window is only available in C# at this time. Visual Basic support will be added in a future release.

Unimplemented Language Features

The Roslyn CTP is intended as a preview of the public APIs that will be exposed by the compilers and language services. The full C# 4 and Visual Basic 10 languages are supported by the parser, but there are several language features that are not yet completely implemented in the current Roslyn compilers.

The set of Known Limitations and Unimplemented Language Features can be found here.


You can uninstall the Roslyn CTP by clicking the Windows start menu and choosing Control Panel -> Programs -> Uninstall a program. In the list of installed programs, click on Microsoft "Roslyn" CTP and choose Uninstall.

Comments (0)