From 847ef03330e34e7d2d78c6e074544ee940a302af Mon Sep 17 00:00:00 2001 From: Mikayla Hutchinson Date: Tue, 27 Feb 2024 23:21:40 -0500 Subject: [PATCH 1/2] Don't try to pass langversion 13 just yet csc in early previews doesn't seem to recognize it --- .../CSharpLangVersionHelper.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mono.TextTemplating/Mono.TextTemplating.CodeCompilation/CSharpLangVersionHelper.cs b/Mono.TextTemplating/Mono.TextTemplating.CodeCompilation/CSharpLangVersionHelper.cs index 347233c..4235e06 100644 --- a/Mono.TextTemplating/Mono.TextTemplating.CodeCompilation/CSharpLangVersionHelper.cs +++ b/Mono.TextTemplating/Mono.TextTemplating.CodeCompilation/CSharpLangVersionHelper.cs @@ -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, From 8034f8bad792300e2eee19cbb7f3b258f1ea9218 Mon Sep 17 00:00:00 2001 From: Mikayla Hutchinson Date: Wed, 28 Feb 2024 11:59:34 -0500 Subject: [PATCH 2/2] Upgrade NuGet.Frameworks for MSBuild tests again --- .../Mono.TextTemplating.Build.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mono.TextTemplating.Build.Tests/Mono.TextTemplating.Build.Tests.csproj b/Mono.TextTemplating.Build.Tests/Mono.TextTemplating.Build.Tests.csproj index e3dd14d..9f81497 100644 --- a/Mono.TextTemplating.Build.Tests/Mono.TextTemplating.Build.Tests.csproj +++ b/Mono.TextTemplating.Build.Tests/Mono.TextTemplating.Build.Tests.csproj @@ -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. --> - +