Skip to content

Fix Blazor WebAssembly diagnostics defaults to use the defined opt-out property#55447

Draft
javiercn with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-diagnostics-feature-switches
Draft

Fix Blazor WebAssembly diagnostics defaults to use the defined opt-out property#55447
javiercn with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-diagnostics-feature-switches

Conversation

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Blazor WebAssembly diagnostics defaults were wired to two different property names. The SDK set BlazorWebAssemblyDiagnosticsEnabled, but the default conditions for MetricsSupport, EventSourceSupport, and HttpActivityPropagationSupport checked BlazorWasmDiagnosticsEnabled, so those switches never defaulted on.

  • SDK property wiring

    • Update Microsoft.NET.Sdk.BlazorWebAssembly.Current.props so all three diagnostics feature switches key off BlazorWebAssemblyDiagnosticsEnabled
    • Align the comment/documented opt-out property with the actual property name
  • Regression coverage

    • Add a focused Blazor WebAssembly test that verifies:
      • default evaluation enables all three switches
      • setting BlazorWebAssemblyDiagnosticsEnabled=false disables all three
<BlazorWebAssemblyDiagnosticsEnabled Condition="'$(BlazorWebAssemblyDiagnosticsEnabled)' == ''">true</BlazorWebAssemblyDiagnosticsEnabled>
<MetricsSupport Condition="'$(MetricsSupport)' == '' and '$(BlazorWebAssemblyDiagnosticsEnabled)' == 'true'">true</MetricsSupport>
<EventSourceSupport Condition="'$(EventSourceSupport)' == '' and '$(BlazorWebAssemblyDiagnosticsEnabled)' == 'true'">true</EventSourceSupport>
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == '' and '$(BlazorWebAssemblyDiagnosticsEnabled)' == 'true'">true</HttpActivityPropagationSupport>

@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: javiercn <6995051+javiercn@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Blazor WASM diagnostics feature switches default behavior Fix Blazor WebAssembly diagnostics defaults to use the defined opt-out property Jul 24, 2026
Copilot AI requested a review from javiercn July 24, 2026 00:13
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.

Blazor WASM diagnostics feature switches never default on (BlazorWasmDiagnosticsEnabled vs BlazorWebAssemblyDiagnosticsEnabled property mismatch)

2 participants