Merge remote-tracking branch 'origin/master' into 1.8
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -161,6 +161,18 @@ namespace Flax.Build
|
||||
/// </summary>
|
||||
public readonly string RuntimeVersionName;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum supported C#-language version for the SDK.
|
||||
/// </summary>
|
||||
public string CSharpLanguageVersion => Version.Major switch
|
||||
{
|
||||
8 => "12.0",
|
||||
7 => "11.0",
|
||||
6 => "10.0",
|
||||
5 => "9.0",
|
||||
_ => "7.3",
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DotNetSdk"/> class.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user