SDK 9.0.100-preview.5.24307.3 Logger Output Not Displaying in Console with dotnet watch run
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
Title: Logger Output Not Displaying in Console with dotnet watch run
> “When running the application with `dotnet run`, the Logger output displays correctly in the console. The issue only occurs when using **dotnet watch run**.”
Description: When using dotnet watch run with .NET SDK version 9.0.100-preview.5.24307.3 on Windows 10, the Logger output does not display in the console.
Reproduction Steps:
Install .NET SDK x64 9.0.100-preview.5.24307.3 on Windows 10 using the built-in sandbox.
Open the console and run` dotnet new blazor` or `dotnet new webapi`.
Inject ILogger at any position in the default template files created by dotnet.
Use ILogger to output any text.
Run` dotnet watch run` in the console.
Access the page where the Logger output is expected.
Observed Behavior:
Logger output does not display in the console.
Replacing `ILogger.LogError("...")` with `Console.WriteLine("...") `also does not display any output in the console.
Replacing `ILogger.LogError("...") `with `throw new Exception("...") `does not display any output in the console.
The browser’s dev tools show the following error:
```
Error: There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details turn on detailed exceptions by setting 'DetailedErrors: true' in 'appSettings.Development.json' or set 'CircuitOptions.DetailedErrors'.
log @ blazor.web.js:1
```
This is a screenshot of an example file in the default template of blazor

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.