Skip to content

Commit

Permalink
Revert "Merge remote-tracking branch 'origin/master' into tasks_clari…
Browse files Browse the repository at this point in the history
…fication" (stride3d#1701)

This reverts commit 06dc98a.
  • Loading branch information
Eideren authored Jun 20, 2023
1 parent 06dc98a commit 9167fe6
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions sources/core/Stride.Core.Tasks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using Microsoft.Build.Locator;
using Mono.Options;
Expand All @@ -18,20 +16,7 @@ static class Program
{
public static int Main(string[] args)
{
try
{
MSBuildLocator.RegisterDefaults();
}
catch (InvalidOperationException e) when (e.Message.StartsWith("No instances of MSBuild could be detected."))
{
// When tasks running through build tools throw, it logs an obtuse 'The command [...]/Stride.Core.Tasks.exe [...] exited with code - x'
// message requiring the user to dig in the output to figure out what happened.
// The following ensures that a clear message is logged before the stuff above is shown.
// Do note that the 'error' word in the message is essential for it to be logged,
// direct any message about this peculiar 'feature' over to Microsoft, thanks !
Console.Error.WriteLine($@"error {typeof(Program).Namespace}: No supported instance of MSBuild could be detected, make sure you have .Net SDK {Environment.Version.Major} {Environment.Version.Minor} installed");
throw;
}
MSBuildLocator.RegisterDefaults();
return RealMain(args);
}

Expand Down

0 comments on commit 9167fe6

Please sign in to comment.