Skip to content

Commit 010b0b9

Browse files
Merge pull request #6658 from MicrosoftDocs/main
Auto Publish – main to live - 2026-04-18 05:00 UTC
2 parents b4623cc + fb12cee commit 010b0b9

58 files changed

Lines changed: 1499 additions & 988 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.openpublishing.redirection.json

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"redirections": [
3+
{
4+
"source_path": "hub/apps/publish/partner-center/account-types-locations-and-fees.md",
5+
"redirect_url": "/windows/apps/publish/partner-center/open-a-developer-account",
6+
"redirect_document_id": false
7+
},
8+
{
9+
"source_path": "hub/apps/publish/partner-center/partner-center-developer-account.md",
10+
"redirect_url": "/windows/apps/publish/partner-center/open-a-developer-account",
11+
"redirect_document_id": false
12+
},
313
{
414
"source_path": "hub/apps/design/widgets/widgets-create-a-template.md",
515
"redirect_url": "/windows/apps/develop/widgets/widgets-create-a-template",
@@ -11420,6 +11430,36 @@
1142011430
"redirect_url": "/windows/apps/dev-tools/visual-studio",
1142111431
"redirect_document_id": false
1142211432
},
11433+
{
11434+
"source_path": "hub/apps/whats-new/community.md",
11435+
"redirect_url": "/windows/apps/develop/support#stay-connected",
11436+
"redirect_document_id": false
11437+
},
11438+
{
11439+
"source_path": "hub/apps/get-started/ai-for-windows-developers.md",
11440+
"redirect_url": "/windows/apps/dev-tools/agentic-tools",
11441+
"redirect_document_id": false
11442+
},
11443+
{
11444+
"source_path": "hub/apps/how-tos/github-copilot-winui-vs.md",
11445+
"redirect_url": "/windows/apps/how-tos/ai-build",
11446+
"redirect_document_id": false
11447+
},
11448+
{
11449+
"source_path": "hub/apps/get-started/ai-build.md",
11450+
"redirect_url": "/windows/apps/how-tos/ai-build",
11451+
"redirect_document_id": false
11452+
},
11453+
{
11454+
"source_path": "hub/apps/get-started/ai-setup.md",
11455+
"redirect_url": "/windows/apps/how-tos/ai-setup",
11456+
"redirect_document_id": false
11457+
},
11458+
{
11459+
"source_path": "hub/apps/get-started/samples.md",
11460+
"redirect_url": "/windows/apps/dev-tools/samples",
11461+
"redirect_document_id": false
11462+
},
1142311463
{
1142411464
"source_path": "hub/apps/design/accessibility/accessibility.md",
1142511465
"redirect_url": "/windows/apps/design/accessibility/accessibility-overview",
@@ -11561,4 +11601,4 @@
1156111601
"redirect_document_id": false
1156211602
}
1156311603
]
11564-
}
11604+
}

hub/apps/desktop/index.yml

Lines changed: 58 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -8,114 +8,95 @@ metadata:
88
description: This documentation provides the latest guidance about building desktop apps for Windows 11.
99
ms.topic: landing-page
1010
ms.collection: collection
11-
ms.date: 11/25/2025
11+
ms.date: 03/27/2026
1212
keywords: windows win32, desktop development
1313

1414
# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new
1515

1616
landingContent:
17-
- title: Get ready for development
17+
- title: Essentials
1818
linkLists:
1919
- linkListType: get-started
2020
links:
21-
- text: What's new in Windows development
22-
url: /windows/apps/whats-new/whats-new-for-developers
23-
- text: Setup and tools
24-
url: ../get-started/start-here.md
25-
- text: An overview of UI frameworks
21+
- text: Essentials
22+
url: ../introduction.md
23+
- text: Core concepts
2624
url: ../get-started/index.md
27-
- text: Windows App SDK
28-
url: ../windows-app-sdk/index.md
25+
- text: Get started with WinUI
26+
url: ../get-started/start-here.md
27+
- text: Tools and samples
28+
url: ../dev-tools/index.md
29+
- text: Help and guidance
30+
url: ../develop/support.md
31+
- text: What's new
32+
url: ../whats-new/whats-new-for-developers.md
2933

30-
- title: Design and UI
34+
- title: Design
3135
linkLists:
3236
- linkListType: overview
3337
links:
34-
- text: Design your app
38+
- text: Design overview
3539
url: ../design/index.md
36-
- text: Design resources and tools
40+
- text: Design principles
41+
url: ../design/design-principles.md
42+
- text: Guidelines
43+
url: ../design/guidelines-overview.md
44+
- text: Tools and resources
3745
url: ../design/downloads/index.md
38-
- text: Design for accessibility
39-
url: ../design/accessibility/accessibility.md
40-
- text: Design basics
41-
url: ../design/basics/index.md
4246

4347
- title: Develop
4448
linkLists:
4549
- linkListType: how-to-guide
4650
links:
47-
- text: Develop apps
51+
- text: Develop overview
4852
url: ../develop/index.md
49-
- text: Best practices for Windows apps
50-
url: ../get-started/best-practices.md
51-
- text: Windows developer FAQ
52-
url: ../get-started/windows-developer-faq.md
53-
- text: Other development tools
54-
url: /windows/dev-environment/
53+
- text: Features
54+
url: ../develop/features-overview.md
55+
- text: Use features with other UI frameworks
56+
url: ../desktop/modernize/index.md
57+
- text: Platform
58+
url: ../develop/platform/csharp-winrt/index.md
59+
- text: API reference
60+
url: ../api-reference/index.md
61+
- text: Tools and samples
62+
url: ../dev-tools/index.md
63+
- text: Tutorials
64+
url: ../winui/winui3/desktop-winui3-app-with-basic-interop.md
5565

56-
- title: Deploy
66+
- title: Package and deploy
5767
linkLists:
58-
- linkListType: overview
68+
- linkListType: deploy
5969
links:
60-
- text: Packaging and deployment overview
70+
- text: Package and deploy overview
6171
url: ../package-and-deploy/index.md
62-
- text: Learn about packaged and unpackaged apps
63-
url: ../desktop/modernize/package-identity-overview.md
64-
- text: Windows App SDK deployment guide
72+
- text: Choose a packaging model
73+
url: ../package-and-deploy/choose-packaging-model.md
74+
- text: Packaging
75+
url: ../package-and-deploy/packaging/index.md
76+
- text: Windows App SDK deployment
6577
url: ../package-and-deploy/deploy-overview.md
66-
- text: The MSIX app package format
67-
url: /windows/msix
6878

6979
- title: Distribute
7080
linkLists:
7181
- linkListType: overview
7282
links:
73-
- text: Microsoft Store overview
83+
- text: Choose a distribution path
84+
url: ../package-and-deploy/choose-distribution-path.md
85+
- text: Publish overview
7486
url: ../publish/index.md
87+
- text: Get started with Microsoft Store
88+
url: ../publish/get-started.md
7589
- text: Open a developer account
7690
url: ../publish/partner-center/open-a-developer-account.md
77-
- text: Microsoft Store FAQ
78-
url: ../publish/faq/get-started-with-the-microsoft-store.md
79-
- text: Microsoft Store Policies
80-
url: ../publish/store-policies.md
81-
82-
- title: Artificial intelligence and machine learning
83-
linkLists:
84-
- linkListType: concept
85-
links:
86-
- text: Windows AI
87-
url: /windows/ai/
88-
- text: GitHub Copilot extension for Visual Studio
89-
url: /visualstudio/ide/visual-studio-github-copilot-extension
90-
- text: App Actions on Windows
91-
url: /windows/ai/app-actions/
92-
- text: Windows ML
93-
url: /windows/ai/new-windows-ml/overview
94-
95-
- title: API Reference
96-
linkLists:
97-
- linkListType: reference
98-
links:
99-
- text: WinRT API for the Windows SDK
100-
url: /uwp/api/
101-
- text: Win32 API for the Windows SDK
102-
url: /windows/win32/api/
103-
- text: WinRT API for the Windows App SDK
104-
url: /windows/windows-app-sdk/api/winrt/
105-
- text: Win32 API for the Windows App SDK
106-
url: /windows/windows-app-sdk/api/win32/
107-
- text: WinUI for UWP API reference
108-
url: /windows/winui/api/
109-
110-
- title: Community and support
111-
linkLists:
112-
- linkListType: overview
113-
links:
114-
- text: Microsoft Q&A Forum
115-
url: /answers/questions/
116-
- text: "@WindowsDocs"
117-
url: https://twitter.com/WindowsDocs
118-
- text: OneDevMinute on Microsoft Learn
119-
url: /shows/One-Dev-Minute/?WT.mc_id=odm-c9-niner
120-
- text: Windows developer support
121-
url: https://developer.microsoft.com/windows/support
91+
- text: Submit your app
92+
url: ../publish/publish-your-app/msix/reserve-your-apps-name.md
93+
- text: Get your app certified
94+
url: ../publish/publish-your-app/msix/app-certification-process.md
95+
- text: Monitor your app performance
96+
url: ../publish/analyze-app-performance/msix.md
97+
- text: Manage and update your app
98+
url: ../publish/publish-your-app/msix/publish-update-to-your-app-on-store.md
99+
- text: Manage your account
100+
url: ../publish/partner-center/manage-account-users.md
101+
- text: Microsoft Store policies and resources
102+
url: ../publish/store-policies.md

hub/apps/desktop/modernize/grant-identity-to-nonpackaged-apps.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ title: Grant package identity by packaging with external location manually
33
description: Learn how to grant package identity to an unpackaged Win32 app so that you can use modern Windows features in that app.
44
ms.date: 04/08/2026
55
ms.topic: how-to
6-
keywords: windows 10, desktop, sparse, package, identity, external, location, MSIX, Win32
6+
keywords: windows 10, desktop, sparse package, packaging with external location, package identity, external location, MSIX, Win32, unpackaged app
77
ms.localizationpriority: medium
88
ms.custom: RS5
99
---
1010

1111
# Grant package identity by packaging with external location manually
1212

13-
For the motivations behind adding package identity, as well as the differences between building
13+
> **Why do this?** Granting your app a package identity (also called a *sparse package* or *packaging with external location*) unlocks Windows platform features that are otherwise unavailable to unpackaged apps: toast and push notifications, background tasks, app extensions, share targets, file associations, startup tasks, privacy consent prompts, and Windows AI Foundry APIs — all without switching to full MSIX packaging or changing your existing installer.
14+
15+
For more about the motivations behind adding package identity, as well as the differences between building
1416
identity packages in Visual Studio and building them manually, see
1517
[Overview](/windows/apps/desktop/modernize/grant-identity-to-nonpackaged-apps-overview).
1618

@@ -264,7 +266,11 @@ var packageManager = new PackageManager();
264266
var options = new AddPackageOptions();
265267
options.ExternalLocationUri = externalUri;
266268

267-
await packageManager.AddPackageByUriAsync(packageUri, options);
269+
var result = await packageManager.AddPackageByUriAsync(packageUri, options);
270+
if (result.ExtendedErrorCode != 0)
271+
{
272+
throw new Exception($"Package registration failed: {result.ErrorText} (0x{result.ExtendedErrorCode:X8})");
273+
}
268274

269275
...
270276

@@ -280,13 +286,14 @@ foreach (var package in packages)
280286

281287
Note the below important details about this code:
282288

283-
* Set `externalLocation` to the absolute path of your application's installation directory
284-
(without any executable names)
285-
* Set `packagePath` to the absolute path of the signed identity package produced in the previous step
289+
* Set `externalLocation` to the **absolute path** of your application's installation directory
290+
(without any executable names). `new Uri(somePath)` produces a `file:///` URI as required by the API.
291+
* Set `packagePath` to the **absolute path** of the signed identity package produced in the previous step
286292
(with the file name)
287293
* The `<IdentityPackageFamilyName>` can be found by running the `Get-AppxPackage <IdentityPackageName>`
288294
PowerShell command on a system where the identity package is registered. The `PackageFamilyName` property
289295
contains the value to use here.
296+
* Check `result.ExtendedErrorCode` after registration to surface actionable error details. See [Troubleshooting](#troubleshooting) for common error codes.
290297

291298
#### Per-Machine (PackageManager)
292299

@@ -336,6 +343,21 @@ Note the below important details about this code:
336343
PowerShell command on a system where the identity package is registered. The `PackageFamilyName`
337344
property contains the value to use here.
338345

346+
## Troubleshooting
347+
348+
The table below lists the most common errors when registering an identity package and how to fix them.
349+
350+
| Error code | Symptom | Cause | Fix |
351+
|---|---|---|---|
352+
| `0x800B0109` / `CERT_E_UNTRUSTEDROOT` | `Add-AppxPackage` or `AddPackageByUriAsync` fails immediately | Self-signed certificate is not in the **Trusted People** store | Follow the [cert trust step](#build-and-sign-the-identity-package) above to import the public `.cer` into `Cert:\CurrentUser\TrustedPeople` |
353+
| `0x80073CF9` | Registration fails with "version already registered" | The exact same package version is already registered on this machine | Unregister the existing package first (`Remove-AppxPackage` or `RemovePackageAsync`), then re-register |
354+
| `0x80073D54` | Registration succeeds but identity is missing at runtime | `publisher`, `packageName`, or `applicationId` in the app's side-by-side manifest (`msix` element) don't match the identity package manifest | Ensure `Publisher`/`Name`/`Application Id` are identical in both manifests — see [Add identity metadata](#add-identity-metadata-to-your-desktop-application-manifests) |
355+
| Identity absent at runtime (no error) | `Package.Current` is null or `GetPackage()` returns nothing | The `ExternalLocation` path passed at registration doesn't match the directory where the app actually runs | Verify the absolute path passed as `ExternalLocation` is exactly the app's install directory |
356+
| `0x80073CF6` | Registration fails with "manifest invalid" | Manifest XML is malformed or a required attribute is missing | Validate the manifest with `MakeAppx.exe pack` — it reports schema errors. Ensure `uap10:AllowExternalContent` is `true` and `runFullTrust` capability is declared |
357+
358+
> [!TIP]
359+
> For richer diagnostics, check the Windows **Event Viewer** under **Applications and Services Logs > Microsoft > Windows > AppxDeployment-Server**. It logs the full deployment error with context that isn't always surfaced in the API result or PowerShell output.
360+
339361
## Sample apps
340362

341363
See the [PackageWithExternalLocation](https://aka.ms/sparsepkgsample) samples for fully functional

hub/apps/desktop/modernize/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Use the table below to find the right starting point for your situation.
1919
| Add modern UI controls (Fluent, rounded corners, dark mode) to my WPF or Win32 app | [Host WinUI controls in a WPF app (XAML Islands)](xaml-islands/xaml-islands.md) |
2020
| Use Windows platform features (notifications, sharing, file pickers) in my WPF or WinForms app | [Call Windows Runtime APIs in desktop apps](desktop-to-uwp-enhance.md) |
2121
| Package my app for the Microsoft Store or enterprise deployment | [Package a desktop app with MSIX](/windows/msix/desktop/source-code-overview) |
22-
| Unlock features that require package identity (background tasks, app extensions) | [Grant identity to an unpackaged app](grant-identity-to-nonpackaged-apps-overview.md) |
22+
| Unlock features that require package identity (push notifications, background tasks, app extensions, Windows AI APIs, share targets, and more) | [Grant identity to an unpackaged app](grant-identity-to-nonpackaged-apps-overview.md) |
2323
| Integrate my app with Windows 11 shell features (snap layouts, context menus, taskbar) | [Integrate with Windows 11 features](desktop-to-uwp-extensions.md) |
2424
| Move to a fully modern app with WinUI 3 over time | [Migrate to WinUI 3](../../winui/winui3/create-your-first-winui3-app.md) |
2525
| Add on-device AI capabilities to my desktop app | [Windows AI Foundry](/windows/ai/overview) |
@@ -50,7 +50,7 @@ For more information, see [Building an MSIX package from your code](/windows/msi
5050

5151
## Features that require package identity
5252

53-
Some Windows platform features — including certain background tasks, app extensions, and sharing targets — require your app to have a [package identity](/uwp/schemas/appxpackage/uapmanifestschema/element-identity) at runtime. You can grant identity to an unpackaged app without full MSIX packaging.
53+
Some Windows platform features — including push notifications, background tasks, app extensions, sharing targets, Windows AI Foundry APIs, file associations, and startup tasks — require your app to have a [package identity](/uwp/schemas/appxpackage/uapmanifestschema/element-identity) at runtime. You can grant identity to an unpackaged app without full MSIX packaging. This approach is sometimes called a *sparse package* or *packaging with external location*.
5454

5555
For more information, see:
5656
- [Package identity overview](package-identity-overview.md)

hub/apps/dev-tools/agentic-tools.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ The WinUI 3 plugin addresses this directly: its custom instructions give Copilot
6868

6969
## Set up step-by-step
7070

71-
For a complete walkthrough — including IDE setup, agent mode, MCP server configuration, and verification — see [Set up GitHub Copilot for Windows development](../get-started/ai-setup.md).
71+
For a complete walkthrough — including IDE setup, agent mode, MCP server configuration, and verification — see [Set up GitHub Copilot for Windows development](../how-tos/ai-setup.md).
7272

7373
## Related content
7474

75-
- [Set up GitHub Copilot for Windows development](../get-started/ai-setup.md)
76-
- [AI-assisted Windows development](../get-started/ai-for-windows-developers.md)
77-
- [Build apps with AI built in](../get-started/ai-for-windows-developers.md#build-apps-with-ai-built-in) — Foundry Local, Phi Silica, and Windows AI APIs
78-
- [GitHub Copilot in Visual Studio](../how-tos/github-copilot-winui-vs.md)
75+
- [Set up GitHub Copilot for Windows development](../how-tos/ai-setup.md)
76+
- [Tutorial: Build a Windows app with GitHub Copilot](../how-tos/ai-build.md)

hub/apps/dev-tools/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Tools and samples for Windows app development
3+
description: Explore tools, samples, and AI-powered resources for building Windows apps, including Visual Studio, agentic AI tools, code samples, and the winapp CLI.
4+
ms.topic: overview
5+
ms.date: 03/27/2026
6+
---
7+
8+
# Tools and samples for Windows app development
9+
10+
Build Windows apps more efficiently with the right tools, samples, and AI-powered resources. Whether you're setting up your development environment, looking for sample code to learn from, or enhancing your AI coding agent with Windows-specific context, this section brings together everything you need to be productive as a Windows app developer.
11+
12+
| Resource | Description |
13+
|---|---|
14+
| [Agentic AI tools](agentic-tools.md) | Enhance your AI coding agent with Windows-specific context using the Microsoft Learn MCP Server and community plugins like the WinUI 3 Development plugin for GitHub Copilot. |
15+
| [Code samples](samples.md) | Browse sample apps that demonstrate Windows features, API usage patterns, and end-to-end scenarios — including the WinUI 3 Gallery and Windows App SDK samples. |
16+
| [Visual Studio](visual-studio.md) | The recommended IDE for building Windows apps with WinUI and the Windows App SDK, featuring XAML Hot Reload, Live Visual Tree, and rich debugging. |
17+
| [Windows App Development CLI (winapp CLI)](winapp-cli/index.md) | A command-line interface for managing Windows SDKs, packaging, app identity, manifests, certificates, and build tools across any app framework. |

0 commit comments

Comments
 (0)