Skip to content

Update WPF tutorial with target framework guidance#36227

Merged
guardrex merged 3 commits intodotnet:mainfrom
mattleibow:patch-2
Oct 17, 2025
Merged

Update WPF tutorial with target framework guidance#36227
guardrex merged 3 commits intodotnet:mainfrom
mattleibow:patch-2

Conversation

@mattleibow
Copy link
Copy Markdown
Member

@mattleibow mattleibow commented Oct 16, 2025

[EDIT by guardrex to add the issue]

Fixes #36228

This pull request updates the Blazor Hybrid WPF tutorial to include new guidance for targeting Windows 10 when using the latest WebView2CompositionControl. The change ensures compatibility with recent platform requirements.

Platform targeting update:

  • Added instructions for setting the <TargetFramework> property to net10.0-windows10.0.17763.0 in the project file for projects using Microsoft.NET.Sdk.Razor, specifically for ASP.NET Core 10.0 and later.
  • Included a note explaining that the updated target framework is required due to the switch to WebView2CompositionControl.

Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/hybrid/tutorials/wpf.md aspnetcore/blazor/hybrid/tutorials/wpf

Added guidance for setting the target framework version to Windows 10 in WPF project files.
@mattleibow mattleibow requested a review from guardrex as a code owner October 16, 2025 17:08
@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Oct 16, 2025

@mattleibow ... Thanks! Reminder ... We need an issue for any PR here that isn't a patch change. The best way to open an issue is from the bottom of the article using the Open a documentation issue link because it adds tracking metadata to the issue. I'll open the issue for this one, so don't sweat it. I just mean for future PRs here.

I'll take a look at this first thing tomorrow, Friday, morning. If you need me to add technical reviewers, let me know who to add.

UPDATE: Done! The issue is open. We're good!

@guardrex guardrex self-assigned this Oct 16, 2025
Co-authored-by: Beth Massi <bethma@microsoft.com>
Copy link
Copy Markdown
Collaborator

@guardrex guardrex left a comment

Choose a reason for hiding this comment

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

@mattleibow @BethMassi ... Mirroring my remark below: This isn't the way that we handle versioning new API in project templates for tutorials. If this is a migration issue, then it would be for the migration article (possibly for the What's New article if we'd speak to the new control as a new feature/offering). An app generated from the .NET 10 template will have the correct TFM, and this article makes no mention of this control ... and our tutorials never cover migration aspects. AFAICT, this PR isn't needed and should be closed.

In the project file's existing `<TargetFramework>` property, add a Windows 10 version number:

```xml
<TargetFramework>net10.0-windows10.0.17763.0</TargetFramework>

This comment was marked as resolved.

@BethMassi
Copy link
Copy Markdown
Contributor

@guardrex this isn't a migration issue, this is how you implement Blazor hybrid in WPF apps starting with .NET 10. If you are targeting .NET 10 in your WPF apps, you need to also update to target to Windows 10 or later. Blazor hybrid for WPF apps in .NET 10 do not support Windows 7, which is what the default WPF template sets you up with (because that's allowed if you aren't using Blazor hybrd).

@guardrex
Copy link
Copy Markdown
Collaborator

guardrex commented Oct 17, 2025

I think I'm catching on here! 💡

You're saying that they do need to make this change ........

- <TargetFramework>net10.0-windows</TargetFramework>
+ <TargetFramework>net10.0-windows10.0.17763.0</TargetFramework>

I thought that that change wouldn't matter after GA ... that it would only need to target net10.0-windows.

net10.0-windows is Windows 7 without making the update. I get it now.

Sorry for the trouble!!!!! My 🧠 is totally fried out from a total overhaul of our Configuration article this week.

I'll make the text suggestions now, and we can get this wrapped up and merged.

Copy link
Copy Markdown
Collaborator

@guardrex guardrex left a comment

Choose a reason for hiding this comment

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

Ok ..... now that I understand what's going on 🧠🔥🙈😆, see if my suggestions make sense.

Copy link
Copy Markdown
Collaborator

@guardrex guardrex left a comment

Choose a reason for hiding this comment

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

Thanks @mattleibow and @BethMassi! Have a great weekend! 🌞

@guardrex guardrex merged commit c6d5fe5 into dotnet:main Oct 17, 2025
3 checks passed
@mattleibow mattleibow deleted the patch-2 branch October 19, 2025 19:04
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.

Update WPF tutorial with target framework guidance

3 participants