Categories
.net .net-core .net-framework-version c# visual-studio

What are the correct version numbers for C#?

2799

What are the correct version numbers for C#? What came out when? Why can’t I find any answers about C# 3.5?

This question is primarily to aid those who are searching for an answer using an incorrect version number, e.g. C# 3.5. The hope is that anyone failing to find an answer with the wrong version number will find this question and then search again with the right version number.

4

3100

C# language version history:

These are the versions of C# known about at the time of this writing:

In response to the OP’s question:

What are the correct version numbers for C#? What came out when? Why can’t I find any answers about C# 3.5?

There is no such thing as C# 3.5 – the cause of confusion here is that the C# 3.0 is present in .NET 3.5. The language and framework are versioned independently, however – as is the CLR, which is at version 2.0 for .NET 2.0 through 3.5, .NET 4 introducing CLR 4.0, service packs notwithstanding. The CLR in .NET 4.5 has various improvements, but the versioning is unclear: in some places it may be referred to as CLR 4.5 (this MSDN page used to refer to it that way, for example), but the Environment.Version property still reports 4.0.xxx.

As of May 3, 2017, the C# Language Team created a history of C# versions and features on their GitHub repository: Features Added in C# Language Versions. There is also a page that tracks upcoming and recently implemented language features.

1

424

This is the same as most answers here, but tabularized for ease, and it has Visual Studio and .NET versions for completeness.

C# versionVS version.NET versionCLR versionRelease date
1.020021.01.0Feb 2002
1.220031.11.1Apr 2003
2.020052.02.0Nov 2005
3.02.0Nov 2006
3.020083.52.0Nov 2007
4.020104.04Apr 2010
5.020124.54Aug 2012
5.020134.5.14Oct 2013
4.5.24May 2014
6.020154.64Jul 2015
4.6.14Nov 2015
4.6.24Aug 2016
7.02017Mar 2017
4.74May 2017
7.12017 (v15.3)Aug 2017
4.7.14Oct 2017
7.22017 (v15.5)Dec 2017
4.7.24Apr 2018
7.32017 (v15.7)May 2018
8.020194.84Apr 2019
9.02019 (v16.8)5.0***Nov 2020

Versions since .NET Core

C# versionVS version.NET versionRelease dateEnd of Support
2015 Update 3.NET Core 1.0Jun 2016Jun 2019
.NET Core 1.1Nov 2016Jun 2019
7.12017 (v15.3).NET Core 2.0Aug 2017Oct 2018
7.32017 (v15.7).NET Core 2.1May 2018Aug 2021
.NET Core 2.2Dec 2018Dec 2019
2019 (v16.3).NET Core 3.0Sep 2019Mar 2020
2019 (v16.4).NET Core 3.1Dec 2019Dec 2022
9.02019 (v16.8).NET 5Nov 2020Feb 2022
10.02022.NET 6Nov 2021Nov 2024
.NET 7Nov 2022Feb 2023
.NET 8Nov 2023Nov 2026

* – .NET 5.0 is not a newer version of .NET framework but .NET Core 3. Starting from .NET 5.0, there are no newer versions of .NET full framework.

** – There are no separate CLR (CoreCLR) versions for .NET Core. Whatever is the .NET Core version is the CoreCLR version. So not mentioning it.


Note: .NET development is pretty much independent of VS these days, there is no correlation between versions of each.
Refer to “.NET Framework versions and dependencies” and “.NET release cadence” for more.

6

  • @Dai, There is no implication in my answer that C# 8.0 is tied to .NET 4.8 In fact there was never a requirement that certain compiler versions required certain .NET versions absolutely, except for select few features. That was true even before C# 8.0. My answer just tracks the timelines of VS, .NET and C# versions. My original answer was in the context of .NET full framework, until that ceased to exist. You can see that there is no other .NET Core versions in the table, because I didnt take the pain to cover that as well. With your edit, viewers will lose information about .NET 4.8.

    – nawfal

    Feb 25, 2021 at 9:59

  • Please feel free to add an additional column for .NET Core versions.

    – nawfal

    Feb 25, 2021 at 9:59

  • You wrote ‘not fair’ for my edit. I had added it from .NET release cadence and also I had added to the post. You should remove it too then. I mean it is not an estimation. I could write another answer if you don’t want to, but I think it wouldn’t be fair then because the idea is yours.

    – gurkan

    May 13, 2021 at 8:28

  • @gurkan fair enough, makes sense. I brought back your changes, made few corrections.

    – nawfal

    May 14, 2021 at 8:15

  • @all, please dont add values if their released date doesn’t match. When I wrote this originally I didnt intend to associate .net version against every compiler version. Its just a timeline of various C# related releases. So naturally you could see I omitted some column values. This helps us giving a better idea which all releases were made together.

    – nawfal

    May 14, 2021 at 8:16


322

The biggest problem when dealing with C#’s version numbers is the fact that it is not tied to a version of the .NET Framework, which it appears to be due to the synchronized releases between Visual Studio and the .NET Framework.

The version of C# is actually bound to the compiler, not the framework. For instance, in Visual Studio 2008 you can write C# 3.0 and target .NET Framework 2.0, 3.0 and 3.5. The C# 3.0 nomenclature describes the version of the code syntax and supported features in the same way that ANSI C89, C90, and C99 describe the code syntax and features for C.

Take a look at Mono, and you will see that Mono 2.0 (mostly implemented version 2.0 of the .NET Framework from the ECMA specifications) supports the C# 3.0 syntax and features.

0