Skip to content

[browser][wasm] Remove temporary SDK/TFM pins from the browser PGO training lane #134929

Open

Description

@pavelsavara

Summary

The browser/WASM PGO training lane (in the internal dotnet-optimization repo) currently carries temporary version pins that exist only to work around an in-flight net12 TFM rollover in the 12.0.100 SDK band. This tracks removing them once the band is self-consistent.

Related https://dev.azure.com/dnceng/internal/_git/dotnet-optimization/pullrequest/65845

Background

CoreCLR-on-browser publish support — Microsoft.NET.Sdk.WebAssembly.Browser.CoreCLR.targets and BrowserWasmApp.CoreCLR.targets — first ships in the 12.0.100 band. Verified by inspecting the packs: Microsoft.NET.Sdk.WebAssembly.Pack 12.0.0-alpha.1.26454.116 contains the CoreCLR targets, while 11.0.0-preview.7.26357.109 and 11.0.0-rc.1.26420.114 contain only …Browser.targets / …Pack.targets. On an 11.0.100 SDK a UseMonoRuntime=false Blazor publish resolves the CoreCLR runtime pack but then runs the Mono toolchain against it and fails.

The lane therefore needs a 12.0.100 SDK. But every 12.0.100-alpha SDK built since ~2026-09-23 is internally inconsistent about net12.0:

SDK build date BundledNETCoreAppTargetFrameworkVersion dotnet new blazorwasm TFM
12.0.100-alpha.1.26459.118 2026-09-09 11.0 net11.0 buildable
12.0.100-alpha.1.26461.114 2026-09-11 11.0 net11.0 buildable
12.0.100-alpha.1.26473.131 2026-09-23 11.0 net12.0 broken
12.0.100-alpha.1.26477.102 2026-09-27 11.0 net12.0 broken
12.0.100-alpha.1.26478.119 2026-09-28 11.0 net12.0 broken
12.0.100-alpha.1.26479.111 2026-09-29 11.0 net12.0 broken

Consequences:

  1. A net12.0 project fails with NETSDK1045: The current .NET SDK does not support targeting .NET 12.0.
  2. Overriding NETCoreAppMaximumVersion clears that, but the publish then fails with MSB4057: The target "WasmBuildApp" does not exist — the wasm workload packs are still net11-aliased, so a net12.0 project gets none of the wasm targets.
  3. The only workable configuration today is a net11.0 project on a 12.0.100 SDK, which still resolves the SDK's bundled 12.0 runtime pack (the one carrying collectPgoTrace from Interpreter block-count PGO for WebAssembly CoreCLR #132721).

Worth noting the previous cycle did not have this problem — the mismatch was in the harmless direction. The 11.0.100 band carried BundledNETCoreAppTargetFrameworkVersion = 11.0 from its first build while the template lagged at net10.0 for 4+ weeks:

SDK build date max TFM template
11.0.100-alpha.1.25609.108 2025-12-09 11.0 net10.0
11.0.100-alpha.1.26055.114 2026-01-05 11.0 net10.0

So this is an inversion of the normal transition, not a normal transition window — there is no previous-cycle duration to extrapolate a wait from.

Pins to remove

All in the internal dotnet-optimization repo (added by internal PRs 65946 and 65845):

  • eng/Versions.props — BrowserTrainingSdkVersion (currently 12.0.100-alpha.1.26478.119). A hand-pinned SDK outside Maestro flow; delete once the flowed VSRedistCommonNetCoreSDKMSBuildExtensionsPackageVersion reaches a working 12.0.100 band.
  • eng/Versions.props — BrowserTrainingAspNetVersion (currently 11.0.0-rtm.26478.122). Pinned to 11.x only because the app targets net11.0 and the 12.0 ASP.NET packages ship lib/net12.0 only.
  • src/products/netcoreapp/Browser_CoreCLR.cs — the SdkVersion override; removing it returns the product to the flowed SDK.
  • src/scenarios/netcoreapp/apps/BlazorWasm/BlazorWasm.csproj — <TargetFramework>net11.0</TargetFramework> → net12.0, and drop the explicit Microsoft.AspNetCore.Components.WebAssembly PackageReference version if the SDK supplies it implicitly.

Optional, not required by this rollover:

  • src/products/netcoreapp/CoreCLR.cs — the virtual string SdkVersion mechanism itself. Harmless to keep (defaults to the flowed version) and useful for any future band skew; remove only if nothing else uses it.

Note the wasm-tools workload install is not part of this cleanup: it is required because the training app sets EnableDiagnostics=true, which needs a native relink to embed the diagnostic server. A plain IL-only Blazor publish (Mono or CoreCLR) needs no workload at all.

Trigger condition

When a 12.0.100 SDK reports BundledNETCoreAppTargetFrameworkVersion = 12.0 and a net12.0 Blazor project publishes with the wasm workload installed.

Quick check:

SDK=<newest 12.0.100-alpha>
curl -sSfL "https://ci.dot.net/public/Sdk/$SDK/dotnet-sdk-$SDK-linux-x64.tar.gz" -o /tmp/s.tgz
mkdir -p /tmp/sdk && tar -xzf /tmp/s.tgz -C /tmp/sdk
grep -o '<BundledNETCoreAppTargetFrameworkVersion>[^<]*' \
  /tmp/sdk/sdk/*/Microsoft.NETCoreSdk.BundledVersions.props
# currently prints 11.0; this issue is actionable when it prints 12.0

Open question

Whether the SDK band inconsistency itself deserves a separate issue against the SDK / VMR. It is not specific to Blazor or to PGO — any dotnet new + build on a 12.0.100-alpha SDK from 2026-09-23 onward reproduces NETSDK1045, so it may already be known or intentional mid-rollover state.

Note

This issue was drafted with GitHub Copilot.

Activity

  1. self-assigned this
    on Sep 30, 2026
  2. added
    arch-wasm
    os-browser
    on Sep 30, 2026
  3. dotnet-policy-service commented on Sep 30, 2026

    @dotnet-policy-service
    Contributor

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

  4. added
    untriaged
    on Sep 30, 2026
  5. dotnet-policy-service commented on Sep 30, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/runtime-infrastructure
    See info in area-owners.md if you want to be subscribed.

  6. removed
    untriaged
    on Sep 30, 2026
  7. added this to the 12.0.0 milestone on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

arch-wasmarea-Infrastructureos-browser

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions