Muistiinpano
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää kirjautua sisään tai vaihtaa hakemistoa.
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää vaihtaa hakemistoa.
You don't need to rewrite your WPF, Windows Forms, or Win32 app to take advantage of modern Windows features. The Windows App SDK and the broader Windows platform offer modular capabilities you can adopt incrementally, at your own pace.
This article introduces three independent modernization approaches—calling Windows Runtime (WinRT) APIs, adding the Windows App SDK, and adopting MSIX packaging—so you can decide which features to add and where to start based on your app's framework.
UI framework migration to WinUI 3
If your goal is to fully modernize your app's UI layer, we recommend migrating to WinUI 3 — the native UI framework for Windows desktop apps. See Create your first WinUI 3 app to get started.
If you want to add Windows features to your existing app framework (WPF, Windows Forms, or C++ Win32) without changing your UI layer, use one of the modernization approaches described in this article.
Note
This article covers adding modern Windows features to your existing desktop app. If you want to modernize your .NET toolchain or C++ compiler, see GitHub Copilot modernization for .NET or the Microsoft C++ porting and upgrading guide.
Modernization approaches
The three modernization approaches are independent. You can use one, two, or all three in the same app.
| Approach | What it gives you | Requires packaging? |
|---|---|---|
| WinRT APIs | Direct access to Windows platform APIs (notifications, Bluetooth, share contract, sensors, and more) from any .NET or C++ desktop app | No, for most APIs |
| Windows App SDK | A NuGet package that brings modern Windows development features (windowing, text rendering, resources, and more) to existing apps | No, for most features |
| MSIX packaging | A modern installer with clean uninstall, automatic updates, and package identity; requires no source code changes | N/A — packaging is the approach |
Tip
Start with WinRT APIs if you want to call a specific Windows platform API. Add the Windows App SDK when you need its features (DWriteCore, MRT Core, windowing). Add MSIX packaging when you need package identity or want to modernize your installer.
WinRT APIs
Windows Runtime (WinRT) APIs expose Windows platform features such as app notifications, the share contract, Bluetooth, and more. You can call these APIs directly from WPF, Windows Forms, and C++ Win32 apps.
Windows App SDK
The Windows App SDK delivers modern Windows development features as a NuGet package you add to your existing project. You don't need to change your UI framework.
MSIX packaging and package identity
MSIX packaging replaces your existing installer and gives your app package identity. Some Windows features — including background tasks, startup tasks, file associations, and Windows AI Foundry — require package identity at runtime. If you want to keep your existing installer, you can still grant package identity without full MSIX packaging — an approach sometimes called packaging with external location or a sparse package.
- Packaging overview
- Features that require package identity
- Grant identity to a non-packaged app
- Integrate your desktop app with Windows using packaging extensions
- Package your app using single-project MSIX
Framework-specific starting points
The following table lists the recommended starting point for each desktop app framework.
| Your framework | Recommended starting point |
|---|---|
| WPF | Use the Windows App SDK in an existing project |
| Windows Forms | Use the Windows App SDK in an existing project |
| C++ Win32 | Use the Windows App SDK in an existing project |
| C++/WinRT | WinRT APIs for desktop apps |
Feature catalog for desktop app modernization
The following tables list common modernization features and whether each one requires the Windows App SDK or package identity.
AI
| Feature | Windows App SDK required? | Package identity required? |
|---|---|---|
| Windows AI Foundry | No | Yes |
UI and text
| Feature | Windows App SDK required? | Package identity required? |
|---|---|---|
| WinUI 3 components in a desktop app | Yes | No |
| Render text with DWriteCore | Yes | No |
| Apply Mica or Acrylic to Win32 apps | No | No |
| Apply rounded corners | No | No |
| Apply Windows themes | No | No |
App lifecycle
| Feature | Windows App SDK required? | Package identity required? |
|---|---|---|
| Background tasks (Windows App SDK) | Yes | Yes |
| Startup tasks | No | Yes |
Windows integration
| Feature | Windows App SDK required? | Package identity required? |
|---|---|---|
| Share sheet integration | No | No |
| Cross Device People API | No | No |
| File associations | No | Yes |
| Windows Widgets | No | Yes |
Security
| Feature | Windows App SDK required? | Package identity required? |
|---|---|---|
| Credential locker | No | No |
| OAuth 2.0 | No | No |
| Fingerprint biometrics | No | No |
| Smart cards | No | No |
| Cryptography | No | No |
Resources
| Feature | Windows App SDK required? | Package identity required? |
|---|---|---|
| MRT Core resource management | Yes | No |
For the full list of platform features available in desktop apps, see Windows app platform overview.
AI-assisted modernization
The GitHub Copilot modernization agent can analyze your desktop solution and generate pull requests that add modern Windows features or upgrade your app to a newer .NET version. For details, see AI-assisted modernization.
Related content
Windows developer