Compile C# scripts with latest detected C# language version

This commit is contained in:
2023-11-26 20:27:12 +02:00
parent aab88a746d
commit ef8bb33105
@@ -247,7 +247,7 @@ namespace Flax.Build
args.Add("/fullpaths");
args.Add("/filealign:512");
#if USE_NETCORE
args.Add("/langversion:11.0");
args.Add($"/langversion:{dotnetSdk.CSharpLanguageVersion}");
args.Add(string.Format("/nullable:{0}", buildOptions.ScriptingAPI.CSharpNullableReferences.ToString().ToLowerInvariant()));
if (buildOptions.ScriptingAPI.CSharpNullableReferences == CSharpNullableReferences.Disable)
args.Add("-nowarn:8632"); // The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.