From da9a574e9c030f1ec2fe1b31829c5deaa53f3a7e Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Mon, 27 Jul 2026 09:26:33 -0500 Subject: [PATCH 1/2] [wasm] Give the CoreCLR wasm SDK its own props The workload pack's Sdk.targets imported BrowserWasmApp.props (and through it WasmApp.Common.props) unconditionally, so the CoreCLR flavor picked up Mono's WasmNestedPublishAppDependsOn=_WasmBuildAppCore even though WasmApp.Common.targets, which defines that target, is never imported on the CoreCLR path. Publishing a CoreCLR browser-wasm app therefore failed with: MSB4057: The target "_WasmBuildAppCore" does not exist in the project. Add BrowserWasmApp.CoreCLR.props with just the flavor-neutral properties (TargetOS/TargetArchitecture/RuntimeIdentifier) and import the props/targets pair per flavor, mirroring what the in-tree WasmApp.InTree.props/targets already do. The Mono files are untouched. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b49e36e8-8a37-48ef-b7e8-54ac6443ea19 --- .../browser/build/BrowserWasmApp.CoreCLR.props | 17 +++++++++++++++++ ...icrosoft.NET.Runtime.WebAssembly.Sdk.pkgproj | 1 + .../Sdk/Sdk.targets.in | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/mono/browser/build/BrowserWasmApp.CoreCLR.props diff --git a/src/mono/browser/build/BrowserWasmApp.CoreCLR.props b/src/mono/browser/build/BrowserWasmApp.CoreCLR.props new file mode 100644 index 00000000000000..8a0a77b249068a --- /dev/null +++ b/src/mono/browser/build/BrowserWasmApp.CoreCLR.props @@ -0,0 +1,17 @@ + + + + browser + wasm + browser-wasm + + diff --git a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Microsoft.NET.Runtime.WebAssembly.Sdk.pkgproj b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Microsoft.NET.Runtime.WebAssembly.Sdk.pkgproj index e27ba5d289a1e5..d0694fb4fef4fd 100644 --- a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Microsoft.NET.Runtime.WebAssembly.Sdk.pkgproj +++ b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Microsoft.NET.Runtime.WebAssembly.Sdk.pkgproj @@ -17,6 +17,7 @@ + diff --git a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.targets.in b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.targets.in index 9d3818cdbe0b5f..f80f682f914678 100644 --- a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.targets.in +++ b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.targets.in @@ -12,7 +12,8 @@ true - + + From 84a7701eec3eba0f43e89eabe9483e7047960489 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Mon, 27 Jul 2026 13:13:49 -0500 Subject: [PATCH 2/2] Drop the CoreCLR props file, conditioning the import is enough Per review feedback, none of the three properties are needed: - RuntimeIdentifier is set by the WebAssembly SDK (WasmSdk/Sdk/Sdk.props and Microsoft.NET.Sdk.WebAssembly.Pack.props), both before this Sdk.targets runs. - TargetOS/TargetArchitecture are only consumed in-tree (eng/native.wasm.targets); eng/OSArch.props already derives both from RuntimeIdentifier == 'browser-wasm', which is why in-tree CoreCLR works today without importing BrowserWasmApp.props. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b49e36e8-8a37-48ef-b7e8-54ac6443ea19 --- .../browser/build/BrowserWasmApp.CoreCLR.props | 17 ----------------- ...icrosoft.NET.Runtime.WebAssembly.Sdk.pkgproj | 1 - .../Sdk/Sdk.targets.in | 7 ++++++- 3 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 src/mono/browser/build/BrowserWasmApp.CoreCLR.props diff --git a/src/mono/browser/build/BrowserWasmApp.CoreCLR.props b/src/mono/browser/build/BrowserWasmApp.CoreCLR.props deleted file mode 100644 index 8a0a77b249068a..00000000000000 --- a/src/mono/browser/build/BrowserWasmApp.CoreCLR.props +++ /dev/null @@ -1,17 +0,0 @@ - - - - browser - wasm - browser-wasm - - diff --git a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Microsoft.NET.Runtime.WebAssembly.Sdk.pkgproj b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Microsoft.NET.Runtime.WebAssembly.Sdk.pkgproj index d0694fb4fef4fd..e27ba5d289a1e5 100644 --- a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Microsoft.NET.Runtime.WebAssembly.Sdk.pkgproj +++ b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Microsoft.NET.Runtime.WebAssembly.Sdk.pkgproj @@ -17,7 +17,6 @@ - diff --git a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.targets.in b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.targets.in index f80f682f914678..54b39b2384c41c 100644 --- a/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.targets.in +++ b/src/mono/nuget/Microsoft.NET.Runtime.WebAssembly.Sdk/Sdk/Sdk.targets.in @@ -12,8 +12,13 @@ true + -