Use stable net/netframework folders for WebAssembly.Pack.Tasks#130782
Open
akoeplinger wants to merge 1 commit into
Open
Use stable net/netframework folders for WebAssembly.Pack.Tasks#130782akoeplinger wants to merge 1 commit into
akoeplinger wants to merge 1 commit into
Conversation
The Microsoft.NET.Sdk.WebAssembly.Pack package placed the Pack.Tasks assembly in TFM-versioned subfolders (tools/net11.0, tools/net472), and the consuming targets/props hardcoded those TFMs. Every .NET Core TFM bump then required coordinated updates across the layout producer and all consumers. Emit the task build output into stable, version-independent folders (net for .NET Core, netframework for .NET Framework) by overriding OutputPath/IntermediateOutputPath, mirroring ILLink.Tasks. The package layout and all consumers (Browser.targets, WasmApp.InTree.props, the trimming test template) now use the same net/netframework names, so no TFM version strings remain and future TFM bumps need no changes here. Contributes to #123155 Co-authored-by: Copilot <[email protected]> Copilot-Session: 50cbbd7b-5246-4157-959c-0f92990d8f73
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
akoeplinger
commented
Jul 15, 2026
| Targets supporting Razor MSBuild integration. Contain support for generating C# code using Razor | ||
| and including the generated code in the project lifecycle, including compiling, publishing and producing | ||
| nuget packages. | ||
| --> |
Member
Author
There was a problem hiding this comment.
this comment seemed unrelated so I deleted it, I think it was copy pasted when the target was initially created
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the NuGet layout for Microsoft.NET.Sdk.WebAssembly.Pack.Tasks by moving task outputs from TFM-versioned directories (e.g., tools/net11.0, tools/net472) into version-independent folders (tools/net, tools/netframework), and updates the consuming targets/props/templates accordingly to avoid future churn on TFM bumps.
Changes:
- Override
OutputPath/IntermediateOutputPathinMicrosoft.NET.Sdk.WebAssembly.Pack.Tasks.csprojto emit intonet/andnetframework/, and package those stable paths undertools/. - Update the WebAssembly Browser SDK targets to resolve the task assembly from
tools/netvstools/netframeworkbased onMSBuildRuntimeType. - Update in-tree props and trimming-test templates to pass/override the new stable tasks directory path.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj | Emits and packages task binaries into stable net/ and netframework/ subfolders instead of TFM-versioned folders. |
| src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets | Switches task assembly resolution to use stable tools/net / tools/netframework directories. |
| src/mono/browser/build/WasmApp.InTree.props | Updates in-tree overrides to point to the new stable net/ / netframework/ output folders. |
| eng/testing/linker/trimmingTests.targets | Updates generated trimming-test projects to point at the stable tasks path (net). |
| eng/testing/linker/project.csproj.template | Renames the override property used by generated projects to _WebAssemblySdkTasksDirectory. |
lewing
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Microsoft.NET.Sdk.WebAssembly.Pack package placed the Pack.Tasks assembly in TFM-versioned subfolders (tools/net11.0, tools/net472), and the consuming targets/props hardcoded those TFMs. Every .NET Core TFM bump then required coordinated updates across the layout producer and all consumers.
Emit the task build output into stable, version-independent folders (net for .NET Core, netframework for .NET Framework) by overriding OutputPath/IntermediateOutputPath, mirroring ILLink.Tasks. The package layout and all consumers (Browser.targets, WasmApp.InTree.props, the trimming test template) now use the same net/netframework names, so no TFM version strings remain and future TFM bumps need no changes here.
Contributes to #123155