You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dotnet new selects an older TFM for Apple project templates #26540
When running the .NET 11 SDK from the current checkout, dotnet new maccatalyst and dotnet new macos generate projects targeting .NET 10, even though the source template configuration lists the .NET 11 TFM first and sets it as the default.
Observed with:
$ builds/downloads/dotnet-sdk-11.0.100-rc.2.26426.102/dotnet new maccatalyst
The same happens for macOS (net10.0-macos). The source template.json currently has net11.0-maccatalyst / net11.0-macos as the default, so this may be caused by template package installation or multiple installed template packages with the same identity.
This was exposed by TemplateTest.CreateAndBuildItemTemplates, which tried to execute the generated app using the current repository TFM path.
As part of the fix, add a regression assertion to the template tests that every generated project targets the current Configuration.DotNetTfm, so selecting an older TFM cannot go unnoticed.
Activity
[dotnet] Remove stale template packs when installing. Fixes #26540. (#…