Skip to content

Conversation

@maraf
Copy link
Member

@maraf maraf commented Nov 27, 2025

We had this implemention in WasmAppBuilder. This PR promotes it to WasmSDK

@maraf maraf added this to the 11.0.0 milestone Nov 27, 2025
@maraf maraf self-assigned this Nov 27, 2025
Copilot AI review requested due to automatic review settings November 27, 2025 14:42
@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Nov 27, 2025
@maraf maraf enabled auto-merge (squash) November 27, 2025 14:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR promotes the DiagnosticPorts implementation from WasmAppBuilder to the WasmSDK level by adding support for the DiagnosticPorts MSBuild property to be automatically set as the DOTNET_DiagnosticPorts environment variable in browser WASM applications.

  • Adds DiagnosticPorts to the list of nested build properties in sample WASM builds
  • Creates a new MSBuild target _AddWasmDiagnosticPortsEnvironmentVariable that populates WasmEnvironmentVariable with the diagnostic ports configuration
  • Integrates this target into both build and publish workflows

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/mono/sample/wasm/Directory.Build.targets Adds DiagnosticPorts to the NestedBuildProperty item group to enable passing this property through nested builds
src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets Implements _AddWasmDiagnosticPortsEnvironmentVariable target and adds it as a dependency to both GenerateBuildWasmBootJsonDependsOn and GeneratePublishWasmBootJsonDependsOn to ensure diagnostic ports are configured in both build and publish scenarios

@maraf
Copy link
Member Author

maraf commented Nov 28, 2025

/ba-g Timeout is unrelated

@maraf maraf merged commit fbe7c39 into dotnet:main Nov 28, 2025
43 of 45 checks passed
@maraf maraf deleted the WasmSdkDiagnosticsPort branch November 28, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants