The .NET Compiler Platform

Over the past five years, Microsoft has been working hard on rewriting the Visual Basic and C# compilers entirely in managed code. Visual Studio 2015 with .NET Framework 4.6 relies on this new implementation, known as the .NET Compiler Platform (formerly known as “Project Roslyn”). This is a revolutionary innovation for many reasons, including (but not limited to) the following:

Image .NET now offers compilers-as-a-service. Compilers can generate assemblies, but they also expose APIs to developers. Such APIs focus on syntax analysis, semantic analysis, dynamic compilation to intermediate language, and code emission.

Image Developers can take advantage of APIs exposed by compilers to create tools that easily integrate with Visual Studio, such as custom code analyzers.

Image Visual Basic and C# compilers are now offered as an open source project, available at https://github.com/dotnet/roslyn. Microsoft is accepting contributions from the developer community.

Image Compilers written in managed code can leverage all the power of the .NET Framework.

Image Visual Studio 2015 has many integrated tools, such as new code editor features, powered by the .NET Compiler Platform, which dramatically enhance the coding experience, increasing the developer’s productivity and code quality. In addition, in Visual Studio 2015, many integrated tools (including many tool windows) have been completely rewritten on the .NET Compiler Platform, providing a more reliable and efficient infrastructure.

From a language and syntactical perspective, you will not notice any changes (except for the new features, of course). You use the Visual Basic language (and C# as well) the usual way, and you will be able to take advantage of powerful coding tools as always. For these reasons, and because this book focuses on the Visual Basic language rather than on how the compiler is architected, we do not dive deeply into the .NET Compiler Platform. However, in Chapter 51, “Code Analysis: The .NET Compiler Platform and Tools,” you will learn how to take advantage of the APIs exposed by the .NET Compiler Platform to create live code analyzers. For additional and more detailed information about it, see the “Project Roslyn” home page, at https://github.com/dotnet/roslyn.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.82.244