Repository navigation
Retarget WPF to .NET 12 - #12097
Merged
Merged
Retarget WPF to .NET 12#12097
Conversation
Update the repository target framework to net12.0, add net12.0 as the default framework choice in project templates, and update the developer guide. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the WPF and project-template retargeting to .NET 12.
No open issues 🎉
What changed in this PR
Retargets WPF and its project templates to .NET 12, aligning the product with the broader .NET 12 framework update.
Changes:
- Updates the root target framework and framework version to .NET 12.
- Adds and defaults to
net12.0in all eight C#/VB templates, including English labels and C# feature/content conditions. - Updates the developer-guide sample to
net12.0-windows.
| File | Description |
|---|---|
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/.template.config/template.json |
Adds and defaults to .NET 12. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/.template.config/localize/templatestrings.en.json |
Adds English .NET 12 labels. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/.template.config/template.json |
Defaults to .NET 12 and extends feature/content conditions. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/.template.config/localize/templatestrings.en.json |
Adds English .NET 12 labels. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/.template.config/template.json |
Adds and defaults to .NET 12. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/.template.config/localize/templatestrings.en.json |
Adds English .NET 12 labels. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/.template.config/template.json |
Defaults to .NET 12 and extends feature/content conditions. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/.template.config/localize/templatestrings.en.json |
Adds English .NET 12 labels. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/.template.config/template.json |
Adds and defaults to .NET 12. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/.template.config/localize/templatestrings.en.json |
Adds English .NET 12 labels. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/.template.config/template.json |
Defaults to .NET 12 and extends feature/content conditions. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/.template.config/localize/templatestrings.en.json |
Adds English .NET 12 labels. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-VisualBasic/.template.config/template.json |
Adds and defaults to .NET 12. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-VisualBasic/.template.config/localize/templatestrings.en.json |
Adds English .NET 12 labels. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-CSharp/.template.config/template.json |
Defaults to .NET 12 and extends feature/content conditions. |
packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-CSharp/.template.config/localize/templatestrings.en.json |
Adds English .NET 12 labels. |
Documentation/developer-guide.md |
Retargets the sample to net12.0-windows. |
Directory.Build.props |
Sets the root framework to net12.0 and version to 12.0. |
Review effort: Balanced
Keep templates on net11.0, matching dotnet/winforms; template updates will follow separately. Co-authored-by: Copilot <[email protected]>
akoeplinger
approved these changes
Nov 4, 2026
dipeshmsft
approved these changes
Nov 5, 2026
himgoyalmicro
approved these changes
Nov 6, 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.
Fixes #
Main PR
Description
Retargets WPF to .NET 12 as part of the .NET 12 TFM update.
Directory.Build.props:TargetFrameworknet11.0→net12.0,TargetFrameworkVersion11.0→12.0.Documentation/developer-guide.md: sample usesnet12.0-windows.Microsoft.WinFX.targetsstill loads PresentationBuildTasks fromtools\net11.0, because the task is built for$(BundledNETCoreAppTargetFramework), which is stillnet11.0with the current SDK. It should move when the SDK bundles net12.0.Customer Impact
Without this change, WPF continues to build against net11.0 while the rest of the .NET 12 stack has moved to net12.0.
Regression
No.
Testing
Local, Debug x64:
.\eng\scripts\cibuild.cmd -configuration Debug /p:Platform=x64 /p:Coverage=false: passed, 0 warnings, 0 errors..\eng\scripts\ciunittest.cmd -configuration Debug /p:Platform=x64 /p:Coverage=false: all 6 unit-test projects passed on.NETCoreApp,Version=v12.0, 0 failures.Risk
Low. Only the root target framework changes; build and unit tests pass.
Microsoft Reviewers: Open in CodeFlow