An update to C# versions and C# tooling

Phillip Carter


Starting with Visual Studio 2019 Preview 4 and RC, we’ll be adjusting how C# versions are treated in .NET tooling.

Summary of changes

Firstly, we’re adding two new Language Version (LangVersion) values: LatestMajor and Preview. Here’s how they stack up with the currently supported list of values:

LatestMajorLatest supported major C# language version
PreviewLatest available preview C# language version
LatestLatest supported C# language version (including minor version)
ISO-1C# 1.0/1.2
ISO-2C# 2.0
3C# 3.0
4C# 4.0
5C# 5.0
6C# 6.0
7C# 7.0
7.1C# 7.1
7.2C# 7.2
7.3C# 7.3
8.0C# 8.0


When no LangVersion is specified, the default meaning is now determined by the target framework of your project. When you target a preview framework that also has a corresponding preview C# version, that preview version is the default. If you do not target a preview framework, then Latest is chosen.

Experience when C# 8.0 is in preview

The following scenarios explain how the default C# version will be interpreted while C# 8.0 is still in preview.

Targeting netcoreapp3.0 preview or netstandard2.1 preview

The default language version chosen in this scenario is Preview. The C# 8.0 features you have access to are based entirely on the version of the compiler (and thus the .NET SDK) that you are using. As you use future previews, you may get more (or slightly tweaked) features. When you build a project, the .NET SDK will emit a warning that this is all still in preview.

Targeting .NET Framework

The default language version chosen in this scenario is Latest. Any use of a C# 8.0 feature is a compile error. Visual Studio tooling will prompt you with a quick fix that can change the language version for the project or solution when one of these errors is encountered. Because some features require underlying types or runtime features that are not available on .NET Framework, such as Default Interface Members, you may still get an error for those features when targeting .NET Framework.

Multi-targeting netcoreapp3.0 preview or netstandard2.1 preview and .NET Framework

For the netcoreapp3.0/netstandard2.1 preview targets, the language version is Preview. A warning is emitted on build from the .NET SDK. For the .NET Framework target, the language version is Latest.

Explicit LangVersion is used

If you explicitly set a LangVersion value, that will be respected and the previously mentioned default behavior is ignored.

Experience when C# 8.0 and .NET Core 3.0 are GA

Eventually, C# 8.0 and .NET Core 3.0 will ship in a GA-quality release. Here’s what the relevant LangVersion values will map to at that time:

PreviewNot yet determined


Projects that do not specify a LangVersion will be treated as if they are Latest when C# 8.0 is GA.

If you created a project for C# 8.0 preview targeting .NET Core 3.0 preview or .NET Standard 2.1 preview, and also did not specify a LangVersion, it will be as if Latest is chosen. You will not be opted into Preview under any scenario once C# 8.0 and .NET Core 3.0 are GA.

At the time of writing, there is no plan for a preview of C# when C# 8.0 is GA. Eventually, a preview will ship and we’ll have a blog post explaining it.


Up until this point, the default C# version used in Visual Studio was equivalent to LatestMajor. This has been problematic for two reasons:

  1. C# now evolves between Visual Studio release cycles, but new projects in Visual Studio would still default to an older version of C#.
  2. C# 8.0 preview is a better choice for projects that target .NET Core 3.0 preview, but there was no way to make it a default without also making it the default for projects that weren’t targeting .NET Core 3.0 preview.

More generally, as we evolve C# and continue to release more features that align with a future .NET Core version, we want to make sure that you can use these features as seamlessly as possible. This also allows you to use features earlier in their development lifecycle, increasing the window of time that actionable feedback on a feature could influence its design.

Support and compatibility for preview features

The way to think about support is also a bit different. To allow the use of C# 8.0 preview features within a released Visual Studio 2019, support and compatibility concerns are distinguished by preview vs. released features:

  • Any C# 7.3 and lower feature or behavior is fully supported and fully compatible. No change from what currently exists today.
  • Any C# 8.0 preview feature is unsupported.
  • There is no compatibility guarantee from one C# 8.0 preview to another.

In short, if you use C# 8.0 preview in Visual Studio 2019, some features and behavior may change between now and when C# 8.0 fully releases.

Happy hacking!

Phillip Carter
Phillip Carter

Program Manager, .NET

Follow Phillip   

Ilya Veselov 2019-02-27 13:41:39
What about the current LatestMinor value used in projects targeting the latest C# version, and how it will be migrated?
MgSam 2019-02-27 14:41:53
So you're saying that C# 8.0 is not shipping with VS 2019? That is disappointing (but not entirely surprising given how many features are still in it). So will it be an out-of-band release or is it getting pushed back to VS 2020 or whatever the next VS version is?
Tony Henrique 2019-02-27 16:53:23
This is the right move. New C# 8 features still need improvements and changes.
Heinrich Moser 2019-02-28 02:31:10
Just out of curiosity: What was the rationale behind the previous "LatestMajor" default value? That option always struck me as odd: I don't want small (= low-risk) updates, but I do want large (= high-risk) updates? How does that make sense? (This is an honest question, not a rant!)
Stuart Lang 2019-02-28 03:01:41
I had to double take when I saw a C# post from you Phillip 😆 Have you got a promotion?
SuperCocoLoco . 2019-03-01 04:50:08
I want to see the same evolution to Visual Basic.NET.
Max Mustermann 2019-03-02 06:27:40
Where do I get netstandard2.1 preview? Using VS2019 Preview4/RC with latest netcore3.0 preview just gives me: error NETSDK1045: The current .NET SDK does not support targeting .NET Standard 2.1