Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<PropertyGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true' and '$(UsingMicrosoftNETSdkWebAssembly)' != 'true'">
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

Removing this conditional assignment may break scenarios where projects use Microsoft.NET.Sdk (not the WebAssembly SDK) with RuntimeIdentifier=browser-wasm.

The condition '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true' and '$(UsingMicrosoftNETSdkWebAssembly)' != 'true' specifically handles cases where the external dotnet/sdk WebAssembly or Blazor SDKs are NOT being used. For example, the console template at src/mono/wasm/templates/templates/console/console.0.csproj uses Microsoft.NET.Sdk with RuntimeIdentifier=browser-wasm, which would fall into this category.

If the external dotnet/sdk WasmSDK only sets UseMonoRuntime=true when UsingMicrosoftNETSdkWebAssembly is true, then removing both this conditional assignment and the unconditional one from WasmApp.Common.props would leave UseMonoRuntime unset for these scenarios.

Please verify that the external WasmSDK sets UseMonoRuntime=true for ALL scenarios where browser-wasm or wasi-wasm runtime identifiers are used, not just when using the Microsoft.NET.Sdk.WebAssembly SDK.

Copilot uses AI. Check for mistakes.
<TargetArchitecture>wasm</TargetArchitecture>
<TargetOS>browser</TargetOS>
<UseMonoRuntime>true</UseMonoRuntime>
<OutputType Condition="'$(OutputType)' == ''">Exe</OutputType>
<PublishTrimmed Condition="'$(PublishTrimmed)' == ''">true</PublishTrimmed>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion src/mono/wasm/build/WasmApp.Common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project>
<PropertyGroup>
<TargetArchitecture>wasm</TargetArchitecture>
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

Removing this unconditional assignment could break scenarios where UseMonoRuntime is not set by the external dotnet/sdk WasmSDK.

This file is imported via BrowserWasmApp.propsSdk.targets and applies to all projects using Microsoft.NET.Runtime.WebAssembly.Sdk, including those that don't use Microsoft.NET.Sdk.WebAssembly or Microsoft.NET.Sdk.BlazorWebAssembly.

Before removing this, please confirm that:

  1. The external WasmSDK sets UseMonoRuntime=true for projects with RuntimeIdentifier=browser-wasm regardless of which SDK they use
  2. Or that Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.props conditional assignment remains to cover non-WebAssembly-SDK scenarios

Since both assignments are being removed in this PR, there may be no fallback for projects that use Microsoft.NET.Sdk + wasm-tools workload instead of the WebAssembly SDK directly.

Copilot uses AI. Check for mistakes.
<UseMonoRuntime>true</UseMonoRuntime>

<!-- Top level -->
<WasmBuildAppDependsOn>
Expand Down