Use detected .NET and C# language version in generated project files

This commit is contained in:
2023-11-26 20:26:53 +02:00
parent 0bcd0154e1
commit aab88a746d
2 changed files with 15 additions and 2 deletions

View File

@@ -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>