Skip to content

Need to default to C# 9 when targeting net50 #44756

@jaredpar

Description

@jaredpar

Need to change our language version defaults for C# based on the current target framework:

  • net5.0 and all the variants should map to 9.0
    net3.* should map to 8.0
  • everything else should be 7.3

Relevant code section: https://github.com/dotnet/roslyn/blob/master/src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets#L6

As a part of this change we should also add 9.0 into the supported C# language numbers.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions