Skip to content

Add .NET 12 support to all test project templates - #56833

Merged
Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/net12-test-templates
Oct 29, 2026
Merged

Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/net12-test-templates

Conversation

@Evangelink

Copy link
Copy Markdown
Member

NUnit, xUnit, and Playwright-NUnit templates reject --framework net12.0, although the MSTest variants already support it. Add the missing framework choices so all 11 test project variants support .NET 12 without changing existing choices or net11.0 defaults.

Regenerate localized framework descriptions through the existing template build and add data-driven coverage that checks each generated TargetFramework without restoring packages.

Validation

  • Built the managed SDK layout and passed all 18 focused integration cases: 11 .NET 12 generation cases and seven existing .NET 11 cases.
  • Reproduced the seven baseline rejections and verified 33 updated generation outcomes across explicit net12.0, explicit net11.0, and default selection.
  • SDK build/test host: 12.0.100-alpha.1.26480.102. Source-template compatibility checks used 11.0.100-rc.3.26522.148.
& .\eng\build.ps1 -configuration Debug /v:minimal /p:PublishAot=false /p:_ShouldPublishDotnetAot=false /bl:artifacts\log\Debug\template-managed-layout.binlog
.\.dotnet\dotnet.exe scripts\RunTests.cs -- `
  --project test\dotnet-new.IntegrationTests\dotnet-new.IntegrationTests.csproj `
  --filter "FullyQualifiedName~ProjectTemplate_CanTargetSdkFrameworkWithoutRestore|FullyQualifiedName~ProjectTemplate_CanBeInstalledAndTestsArePassing"

Native AOT was disabled only for local validation because the C++ linker is unavailable. No build configuration files were changed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 12:37
@Evangelink
Evangelink requested review from a team as code owners October 29, 2026 12:37
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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.

🟢 Approval recommended

The review reports no active issues with the .NET 12 test-template framework selection changes.

No open issues 🎉

What changed in this PR

This PR completes .NET 12 framework selection across the SDK’s 11 test project template variants, bringing NUnit, xUnit, and Playwright-NUnit into line with MSTest while preserving existing choices and net11.0 defaults.

Changes:

  • Adds net12.0 to seven template framework-choice lists.
  • Regenerates framework-description entries across 14 locale files per updated template.
  • Adds 11 data-driven integration cases that check generated TargetFramework values without restoring packages.

Template paths below are relative to template_feed/Microsoft.DotNet.Common.ProjectTemplates.11.0/content/.

File Description
test/​dotnet-new.IntegrationTests/​DotnetNewTestTemplatesTests.cs Checks framework generation across all 11 variants without restore.
XUnit-VisualBasic/​.template.config/​template.json Adds the net12.0 framework choice.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.zh-Hant.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.zh-Hans.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.tr.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.ru.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.pt-BR.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.pl.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.ko.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.ja.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.it.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.fr.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.es.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.en.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.de.json Adds the .NET 12 description entry.
XUnit-VisualBasic/​.template.config/​localize/​templatestrings.cs.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​template.json Adds the net12.0 framework choice.
XUnit-FSharp/​.template.config/​localize/​templatestrings.zh-Hant.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.zh-Hans.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.tr.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.ru.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.pt-BR.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.pl.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.ko.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.ja.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.it.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.fr.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.es.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.en.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.de.json Adds the .NET 12 description entry.
XUnit-FSharp/​.template.config/​localize/​templatestrings.cs.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​template.json Adds the net12.0 framework choice.
XUnit-CSharp/​.template.config/​localize/​templatestrings.zh-Hant.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.zh-Hans.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.tr.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.ru.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.pt-BR.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.pl.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.ko.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.ja.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.it.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.fr.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.es.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.en.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.de.json Adds the .NET 12 description entry.
XUnit-CSharp/​.template.config/​localize/​templatestrings.cs.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​template.json Adds the net12.0 framework choice.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.zh-Hant.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.zh-Hans.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.tr.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.ru.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.pt-BR.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.pl.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.ko.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.ja.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.it.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.fr.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.es.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.en.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.de.json Adds the .NET 12 description entry.
Playwright-NUnit-CSharp/​.template.config/​localize/​templatestrings.cs.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​template.json Adds the net12.0 framework choice.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.zh-Hant.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.zh-Hans.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.tr.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.ru.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.pt-BR.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.pl.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.ko.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.ja.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.it.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.fr.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.es.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.en.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.de.json Adds the .NET 12 description entry.
NUnit-VisualBasic/​.template.config/​localize/​templatestrings.cs.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​template.json Adds the net12.0 framework choice.
NUnit-FSharp/​.template.config/​localize/​templatestrings.zh-Hant.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.zh-Hans.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.tr.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.ru.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.pt-BR.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.pl.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.ko.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.ja.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.it.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.fr.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.es.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.en.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.de.json Adds the .NET 12 description entry.
NUnit-FSharp/​.template.config/​localize/​templatestrings.cs.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​template.json Adds the net12.0 framework choice.
NUnit-CSharp/​.template.config/​localize/​templatestrings.zh-Hant.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.zh-Hans.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.tr.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.ru.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.pt-BR.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.pl.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.ko.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.ja.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.it.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.fr.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.es.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.en.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.de.json Adds the .NET 12 description entry.
NUnit-CSharp/​.template.config/​localize/​templatestrings.cs.json Adds the .NET 12 description entry.

Review effort: Balanced

@Evangelink
Evangelink merged commit e051acf into dotnet:main Oct 29, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants