Skip to content

Use stable net/netframework folders for WebAssembly.Pack.Tasks#130782

Open
akoeplinger wants to merge 1 commit into
mainfrom
akoeplinger/wasm-sdk-stable-tools-folders
Open

Use stable net/netframework folders for WebAssembly.Pack.Tasks#130782
akoeplinger wants to merge 1 commit into
mainfrom
akoeplinger/wasm-sdk-stable-tools-folders

Conversation

@akoeplinger

Copy link
Copy Markdown
Member

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

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

Copy link
Copy Markdown
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.

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.
-->

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this comment seemed unrelated so I deleted it, I think it was copy pasted when the target was initially created

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 / IntermediateOutputPath in Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj to emit into net/ and netframework/, and package those stable paths under tools/.
  • Update the WebAssembly Browser SDK targets to resolve the task assembly from tools/net vs tools/netframework based on MSBuildRuntimeType.
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants