Improve dotnet host runtime detection if pack has multiple different versions
This commit is contained in:
2
Source/ThirdParty/nethost/nethost.Build.cs
vendored
2
Source/ThirdParty/nethost/nethost.Build.cs
vendored
@@ -35,6 +35,8 @@ public class nethost : ThirdPartyModule
|
||||
throw new Exception($"Missing NET SDK {DotNetSdk.MinimumVersion}.");
|
||||
if (!dotnetSdk.GetHostRuntime(options.Platform.Target, options.Architecture, out var hostRuntimePath))
|
||||
{
|
||||
if (options.Target.IsPreBuilt)
|
||||
return; // Ignore missing Host Runtime when engine is already prebuilt
|
||||
if (options.Flags.HasFlag(BuildFlags.GenerateProject))
|
||||
return; // Ignore missing Host Runtime at projects evaluation stage (not important)
|
||||
throw new Exception($"Missing NET SDK runtime for {options.Platform.Target} {options.Architecture}.");
|
||||
|
||||
Reference in New Issue
Block a user