.NET Compiler Platform

from Wikipedia, the free encyclopedia

.NET compiler platform (codenamed Roslyn ) is the name for one of Microsoft developed platform , the compiler for the .NET -Programmiersprachen C # and Visual Basic .NET includes. These compilers are used to compile C # or VB code into CIL code and were developed as successors to the original compilers developed for these languages, among other things to better deal with the functionality of the two programming languages, which has increased over time can. The platform also includes a class library and programming interfaces , among other things for code analysis, for extensions of the Visual Studio development environment and for the extension of the compiler itself. In contrast to the original compilers, which were programmed in C ++ , the compilers contained in the platform are in the programming languages ​​for which they are intended, ie the C # compiler was programmed in C # and the VB compiler in VB .NET.

history

The history of the platform goes back to at least 2010. Before Visual Studio was released in 2015, the project was code-named Roslyn . Microsoft released a first pre-release version in October 2011 as a Visual Studio 2010 extension , which after many updates to the Roslyn API for Visual Studio 2012 could be downloaded as an extension. In April 2014 it was released as open source software under the Apache license 2.0. The language properties of versions C # 6 and Visual Basic.NET 14 can only be used with the Roslyn extension. The APIs are available with the NuGet package manager from version 2.8.1.

With the appearance of VS 2015, the project left the development phase, along with the renaming to .NET Compiler Platform and publication as open source software. In VS 2015, the compilers included in the platform replace the original compilers for the first time.

application

Roslyn enables .NET program code to be analyzed, generated, syntactically checked, transformed etc. in a .NET program. For example, existing C # commands can be extended, modified and new ones added by extending or changing the compiler with your own program code. You could also compile for other platforms by replacing the generation of the .NET bytecode ( CIL code ) with the creation of another executable file . Code generators that z. For example, translating VB.NET into other languages ​​or C # syntax checking or syntax highlighting are also relatively easy, since individual parts of the compiler (e.g. the parser or the syntax tree ) can be accessed via the API .

literature

Web links

Individual evidence

  1. Microsoft “Roslyn” CTP , Microsoft Download Center
  2. NET Languages ​​features in C # 6 and VB 14 , Microsoft Open Technologies : Compiler Platform ("Roslyn")
  3. Sebastian Grüner: Visual Studio 2015 published: A lot for apps and open source. In: Golem.de . July 15, 2015, accessed December 10, 2015 .
  4. Peter Monadjemi : The Coming Generations of C # and Visual Basic . Windows Developer . Retrieved June 11, 2015
  5. Fabian Deitelhoff : News about Roslyn and C # Rosige Aussichten Heise Developer. Retrieved June 9, 2015
  6. Holger Schwichtenberg : Language compilers for C # and Visual Basic are now open source . Heise Developer. Retrieved June 9, 2015
  7. Matthias Withopf : Microsoft opens .Net compiler with Roslyn . iX magazine for professional information technology. Retrieved June 11, 2015