Skip to content

Commit 055bb10

Browse files
marafCopilot
andcommitted
Fix _WasmBuildAppCore target not found for CoreCLR browser-wasm samples
Set RuntimeFlavor from Nested_RuntimeFlavor in Directory.Build.props before the WasmApp.InTree.props import, so that BrowserWasmApp.props (and WasmApp.Common.props) is not imported for CoreCLR builds. Previously RuntimeFlavor was only overridden in Directory.Build.targets, which evaluates after props. Subsets.props defaults RuntimeFlavor to Mono for browser-wasm, causing the Mono-specific _WasmBuildAppCore target to be added to WasmNestedPublishAppDependsOn even for CoreCLR builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1a4177a commit 055bb10

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/mono/sample/wasm/Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@
4646
</ItemGroup>
4747
</Target>
4848

49+
<!-- RuntimeFlavor must be set before WasmApp.InTree.props so it imports the correct
50+
flavor-specific props (BrowserWasmApp.props for Mono, nothing for CoreCLR).
51+
Without this, Subsets.props defaults RuntimeFlavor to Mono for browser-wasm,
52+
causing WasmApp.Common.props (Mono) to be imported even for CoreCLR builds. -->
53+
<PropertyGroup>
54+
<RuntimeFlavor Condition="'$(Nested_RuntimeFlavor)' != ''">$(Nested_RuntimeFlavor)</RuntimeFlavor>
55+
</PropertyGroup>
56+
4957
<!-- Import late, so properties like $(ArtifactsBinDir) are set -->
5058
<Import Project="$(BrowserProjectRoot)build\WasmApp.InTree.props" />
5159
</Project>

0 commit comments

Comments
 (0)