Skip to content

Conversation

@maraf
Copy link
Member

@maraf maraf commented Nov 19, 2025

All the removed assignments are duplicates. We have the property set in WasmSDK at https://github.com/dotnet/sdk/blob/main/src/WasmSdk/Sdk/Sdk.props#L18

@maraf maraf added this to the 11.0.0 milestone Nov 19, 2025
@maraf maraf self-assigned this Nov 19, 2025
@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono labels Nov 19, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

@maraf maraf marked this pull request as ready for review November 28, 2025 09:53
Copilot finished reviewing on behalf of maraf November 28, 2025 09:58
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 removes UseMonoRuntime=true property assignments from two WebAssembly SDK build files, claiming they are duplicates of a property set in the external dotnet/sdk WasmSDK repository.

  • Removes unconditional UseMonoRuntime=true from WasmApp.Common.props
  • Removes conditional UseMonoRuntime=true from Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.props

Reviewed changes

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

File Description
src/mono/wasm/build/WasmApp.Common.props Removes unconditional UseMonoRuntime=true assignment that applies to all projects using the WebAssembly SDK
src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.props Removes conditional UseMonoRuntime=true assignment that only applies when NOT using external Blazor/WebAssembly SDKs

@@ -1,8 +1,7 @@
<Project>
<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.
@@ -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.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant