Skip to content

Prevent dotnet watch crash when browser tools are disabled - #57128

Draft
nagilson wants to merge 2 commits into
mainfrom
copilot/fix-dotnet-watch-crash
Draft

nagilson wants to merge 2 commits into
mainfrom
copilot/fix-dotnet-watch-crash

Conversation

@nagilson

@nagilson nagilson commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

dotnet watch -c Release crashed with a KeyNotFoundException while reporting that project settings disabled browser tools, instead of logging the warning and continuing.

  • Logging
    • Register the shared browser-tools warning event with MessageDescriptor, preserving event ID 1021, warning severity, message, and warning emoji.
  • Regression coverage
    • Verify the shared event passes through the watch logger and reports: Hot Reload in the browser is not supported due to project settings.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
3 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@nagilson nagilson changed the title [WIP] Fix dotnet watch crash for web app without browser tools Prevent dotnet watch crash when browser tools are disabled Nov 15, 2026
@TETYYS

TETYYS commented Nov 15, 2026

Copy link
Copy Markdown

i think it missed the point

there seems to be to separate ways to create typed log events, one via LogEvents.Create, other via MessageDescriptor.Create. However, LogEvents.Create doesn't add the log description in s_descriptors. There are other events like the one mentioned in the issue that is "missing"

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dotnet watch -c Release on a web app crashes with KeyNotFoundException for event id 1021

3 participants