Fix missing dotnet hosting components for not yet supported platforms during projects generation stage

This commit is contained in:
Wojtek Figat
2023-02-19 15:16:34 +01:00
parent 0cf40729fa
commit d7e24f0168
5 changed files with 36 additions and 2 deletions

View File

@@ -34,7 +34,11 @@ public class nethost : ThirdPartyModule
if (!dotnetSdk.IsValid)
throw new Exception($"Missing NET SDK {DotNetSdk.MinimumVersion}.");
if (!dotnetSdk.GetHostRuntime(options.Platform.Target, options.Architecture, out var hostRuntimePath))
{
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}.");
}
// Setup build configuration
switch (options.Platform.Target)