Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What version of the compiler is in a microsoft.net.compilers package?

Tags:

c#

.net

Documentation for microsoft.net.compilers package (at https://www.nuget.org/packages/Microsoft.Net.Compilers/) says

.Net Compilers package. Referencing this package will cause the project to be built using the specific version of the C# and Visual Basic compilers contained in the package, as opposed to any system installed version.

... which begs the question: what version of the compiler is in the package?

That same page says that it supports .NET framework 4.5, but that's not the compiler version, is it?

There are several versions of the package. I assume then that different versions of the package may contain different versions of the compiler. Is there a table somewhere that specifies which compiler version is in each package version?

I guess the package contains both c# and vb compilers, but I'm only interested in c#.

like image 718
steve Avatar asked Mar 03 '17 16:03

steve


People also ask

Which compiler is used in dotnet?

NET Compiler Platform, also known by its codename Roslyn, is a set of open-source compilers and code analysis APIs for C# and Visual Basic (VB.NET) languages from Microsoft.

Does .NET have a compiler?

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 . NET community as Microsoft actively improves them.

What is Microsoft Net compilers toolset for?

Compilers. Toolset. ` This package is primarily intended as a method for rapidly shipping hotfixes to customers. Using it as a long term solution for providing newer compilers on older MSBuild installations is explicitly not supported.

What is dotnet compiler?

The . NET Compiler Platform SDK enables you to build analyzers and code fixes that find and correct coding mistakes. Analyzers understand the syntax (structure of code) and semantics to detect practices that should be corrected.


1 Answers

From https://github.com/dotnet/roslyn/wiki/NuGet-packages:

  • Versions 1.x mean C# 6.0 (Visual Studio 2015 and updates). For instance, 1.3.2 corresponds to the most recent update (update 3) of Visual Studio 2015.
  • Version 2.0 means C# 7.0 (Visual Studio 2017 version 15.0).
  • Version 2.1 is still C# 7.0, but with a couple fixes (Visual Studio 2017 version 15.1).
  • Version 2.2 is still C# 7.0, but with a couple more fixes (Visual Studio 2017 version 15.2).
  • Version 2.3 means C# 7.1 (Visual Studio 2017 version 15.3).
  • Version 2.4 is still C# 7.1 and VB 15.3, but with a couple fixes (Visual Studio 2017 version 15.4).
  • Version 2.6 means C# 7.2 and VB 15.5 (Visual Studio 2017 version 15.5).
  • Version 2.7 means C# 7.2 and VB 15.5, but with a number of fixes (Visual Studio 2017 version 15.6).
  • Version 2.8 means C# 7.3 (Visual Studio 2017 version 15.7)
  • Version 2.9 is still C# 7.3 and VB 15.5, but with more fixes (Visual Studio 2017 version 15.8)
  • Version 2.10 is still C# 7.3 and VB 15.5, but a couple more fixes (Visual Studio 2017 version 15.9)
  • Version 3.0 includes C# 8.0 beta (Visual Studio 2019 version 16.0), but 2.11 was used for preview1.
  • Version 3.1 includes a preview of C# 8.0 (Visual Studio 2019 version 16.1)
  • Version 3.2 includes a preview of C# 8.0 (Visual Studio 2019 version 16.2)
  • Version 3.3 includes C# 8.0 (Visual Studio 2019 version 16.3, .NET Core 3.0)
  • Version 3.4 includes C# 8.0 (Visual Studio 2019 version 16.4, .NET Core 3.1)

For language features, see https://github.com/dotnet/csharplang/blob/master/Language-Version-History.md

like image 76
Julien Couvreur Avatar answered Oct 30 '22 11:10

Julien Couvreur