Skip to content

Commit

Permalink
[release/9.0.1xx] Using ConsoleLogger to prevent unexpected behavior (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalPavlik authored Nov 21, 2024
1 parent 97cc1c1 commit e2b4f9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Cli/dotnet/commands/dotnet-run/RunCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@ public void Shutdown()
static ILogger MakeTerminalLogger(VerbosityOptions? verbosity)
{
var msbuildVerbosity = ToLoggerVerbosity(verbosity);
var thing = Assembly.Load("MSBuild").GetType("Microsoft.Build.Logging.TerminalLogger.TerminalLogger")!.GetConstructor([typeof(LoggerVerbosity)])!.Invoke([msbuildVerbosity]) as ILogger;

// Temporary fix for 9.0.1xx. 9.0.2xx will use the TerminalLogger in the safe way.
var thing = new ConsoleLogger(msbuildVerbosity);
return thing!;
}

Expand Down

0 comments on commit e2b4f9e

Please sign in to comment.