NET (pronounced dot net) is a free, open-source software development framework developed by Microsoft. It provides programming tools and guidelines you can use to build a wide range of applications for the web, gaming, mobile devices, desktops and the Internet of Things (IoT).
NET programming language. A language-specific compiler converts the source code to the intermediate language. This intermediate language is then converted into the machine code by the Just-In-Time (JIT) compiler. This machine code is specific to the computer environment that the JIT compiler runs on.
NET uses two compilers, Roslyn, to compile C# or VB code into CIL (common intermediate language), and RyuJIT, to run just-in-time compilation of CIL into native code. Both compilers are highly regarded by the .
The point of the Microsoft.Net.Compilers package is that the compilers distributed with that package will be used for compiling your project, rather than the compiler that comes with .NET Framework or with Visual Studio. The most practical direct benefit is that it allows your projects to use C# 6 features, and then allows those projects to be built on a system that doesn't have a C# 6 compiler installed, for instance on a continuous integration server where you don't want to install the full Visual Studio 2015.
At present there is no purpose to Microsoft.Net.Compilers. This is a NuGet package that is deprecated and will stop being produced after Visual Studio 16.5. There is a successor package named Microsoft.Net.Compilers.Toolset. This package has much the same functionality as Microsoft.Net.Compilers but works with both .NET Desktop and .NET Core MSBuild instances.
Even so Microsoft.Net.Compilers.Toolset is not meant for general consumption. This package serves two specific uses:
This package is not meant for general long term consumption by customers for their build. I understand that some customers choose to do this but such use is also not supported. The package can and will regularly cause breaks by taking dependencies on new versions of MSBuild or tasks / targets in the .NET SDK.
Customers who want to use new versions of the compiler for their builds are instead encouraged to use one of the official distributions of the compiler:
Note: the Microsoft.Net.Compilers package was officially supported as a part of the Microsoft.CodeDom.Providers.DotNetCompilerPlatform package several years ago as it was a dependency. Beginning in version 2.0 though the dependency on Microsoft.Net.Compilers was removed and it now stands as a completely independent package. At the same time we've moved to deprecate Microsoft.Net.Compilers as there are no longer any explicit use cases for it.
This does mean that some customers unexpectedly find themselves with Microsoft.Net.Compilers in their project file because it wasn't removed when Microsoft.CodeDom.Providers.DotNetCompilerPlatform dropped the dependency. The advice for such customers is to simply delete the reference to the package. It is not needed anymore.
It's a package that provides open-source C# and Visual Basic compilers with rich code analysis APIs.
You can find extensive documentation on github:
https://github.com/dotnet/roslyn
As others have said, it contains the .NET compilers for C# and VB.NET.
An interesting aspect of this being a package is that you can specify a specific build of the compiler to for your project, including a version that hasn't been shipped with Visual Studio yet.
We use this in https://github.com/dotnet/project-system which is an open source component of Visual Studio. It allows us to use pre-release versions of the compiler to dogfood language features not supported by the compiler that ships with VS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With