Skip to content

Commit

Permalink
Merge pull request #181 from mono/fix-net9-preview
Browse files Browse the repository at this point in the history
Don't try to pass langversion 13 just yet
  • Loading branch information
mhutch committed Feb 28, 2024
2 parents 4f33c8d + 8034f8b commit 5d0f76c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Microsoft.NET.Test.Sdk brings in a version of NuGet.Frameworks that's older than the one used by MSBuild
and loads first, thereby breaking loading of MSBuild assemblies. Force-upgrade it.
-->
<PackageReference Include="NuGet.Frameworks" Version="6.7.0" />
<PackageReference Include="NuGet.Frameworks" Version="6.9.1" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public static bool IsLangVersionArg (string arg) =>
//https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history
public static CSharpLangVersion FromNetCoreSdkVersion (SemVersion sdkVersion)
=> sdkVersion switch {
{ Major: 9 } => CSharpLangVersion.v13_0,
// disable .NET 9.0 -> C# 13 mapping for now, as csc in early .NET 9.0 previews
// doesn't recognize C# 13 as a valid version option
// { Major: 9 } => CSharpLangVersion.v13_0,
{ Major: 8 } => CSharpLangVersion.v12_0,
{ Major: 7 } => CSharpLangVersion.v11_0,
{ Major: 6 } => CSharpLangVersion.v10_0,
Expand Down

0 comments on commit 5d0f76c

Please sign in to comment.