Fix warning when building C# lib with newer .NET than base version used on deps

This commit is contained in:
Wojtek Figat
2026-02-12 18:26:43 +01:00
parent 865a26cbbe
commit 9c9e17a9d9

View File

@@ -245,6 +245,8 @@ namespace Flax.Build
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.
if (buildOptions.Configuration != TargetConfiguration.Release)
args.Add("-nowarn:1701"); // Assuming assembly reference 'XXX, Version=8.0.0.0' used by 'Y' matches identity 'X, Version=9.0.0.0' of 'X', you may need to supply runtime policy
#else
args.Add("/langversion:7.3");
#endif