Skip to content

Commit d3527ac

Browse files
Merge pull request #5444 from MicrosoftDocs/main
Merge latest windows-dev-docs-pr changes from main to live
2 parents 9cf815e + 6fd5708 commit d3527ac

File tree

6 files changed

+35
-27
lines changed

6 files changed

+35
-27
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Grant package identity by packaging with external location
3+
description: Overview of how to grant package identity to an unpackaged Win32 app so that you can use modern Windows features in that app.
4+
ms.date: 05/20/2025
5+
ms.topic: article
6+
keywords: windows 11, windows 10, desktop, sparse, package, identity, external, location, MSIX, Win32, Visual Studio
7+
ms.localizationpriority: medium
8+
---
9+
10+
# Grant package identity by packaging with external location
11+
12+
Many Windows features can be used by a desktop app only if that app has package identity at runtime. See [Features that require package identity](/windows/apps/desktop/modernize/modernize-packaged-apps). If you have an existing desktop app, with its own installer, then there's very little you need to change in order to benefit from package identity.
13+
14+
Starting in Windows 10, version 2004, you can grant package identity to an app simply by building and registering a *package with external location* with your app. Packaging with external location allows you to register a simple identity package in your existing installer without changing how or where you install your application. You might be familiar with full MSIX packaging; this is a much lighter-weight option.
15+
16+
You can [add an identity package to an existing Visual Studio project](/windows/apps/desktop/modernize/grant-identity-to-nonpackaged-apps-visual-studio) with the Windows Application Packaging Project and [Package with External Location](https://marketplace.visualstudio.com/items?itemName=WapProj-PackageWithExternalLocation.wapprojPackageWithExternalLocation) extension. This approach is recommended when there is a single application project that needs identity. The tooling provides a visual manifest editor, visual Resource Designer for localization, graphical wizard for creating and trusting self-signed certificates, automatic updating of application manifests, and PowerShell scripts to register and unregister the identity package for local testing.
17+
18+
If you don't build with Visual Studio or want to bundle multiple application executables under a shared identity, you can [build an identity package manually](/windows/apps/desktop/modernize/grant-identity-to-nonpackaged-apps).

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ ms.localizationpriority: medium
99

1010
# Grant package identity by packaging with external location in Visual Studio
1111

12-
Many Windows features can be used by a desktop app only if that app has package identity at runtime. See [Features that require package identity](/windows/apps/desktop/modernize/modernize-packaged-apps). If you have an existing desktop app, with its own installer, then there's very little you need to change in order to benefit from package identity.
12+
For the motivations behind adding package identity, as well as the differences between building identity packages in Visual Studio and building them manually, see [Overview](/windows/apps/desktop/modernize/grant-identity-to-nonpackaged-apps-overview).
1313

14-
Starting in Windows 10, version 2004, you can grant package identity to an app simply by building and registering a *package with external location* with your app. Packaging with external location allows you to register a simple identity package in your existing installer without changing how or where you install your application. You might be familiar with full MSIX packaging; this is a much lighter-weight option, as described below.
14+
This topic describes how to build and register an identity package by using Visual Studio. For info about building an identity package manually, see [Grant package identity by packaging with external location manually](/windows/apps/desktop/modernize/grant-identity-to-nonpackaged-apps).
1515

16-
If you already have a Visual Studio project for your application, then building an identity package in Visual Studio provides a more streamlined experience than [building an identity package manually](/windows/apps/desktop/modernize/grant-identity-to-nonpackaged-apps).
17-
18-
These are the steps that we'll be describing in detail in this topic to build and register an identity package using Visual Studio:
16+
These are the steps (which this topic describes in detail) to build and register an identity package by using Visual Studio:
1917

2018
1. [Install Visual Studio components](#install-visual-studio-components)
2119
2. [Add a Packaging Project to your solution](#add-a-packaging-project-to-your-solution)

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2+
title: Grant package identity by packaging with external location manually
23
description: Learn how to grant package identity to an unpackaged Win32 app so that you can use modern Windows features in that app.
3-
title: Grant package identity by packaging with external location
44
ms.date: 10/13/2023
55
ms.topic: article
66
keywords: windows 10, desktop, sparse, package, identity, external, location, MSIX, Win32
77
ms.localizationpriority: medium
88
ms.custom: RS5
99
---
1010

11-
# Grant package identity by packaging with external location
11+
# Grant package identity by packaging with external location manually
1212

13-
Many Windows features can be used by a desktop app only if that app has package identity at runtime. See [Features that require package identity](/windows/apps/desktop/modernize/modernize-packaged-apps). If you have an existing desktop app, with its own installer, there's very little you need to change in order to benefit from package identity.
13+
For the motivations behind adding package identity, as well as the differences between building identity packages in Visual Studio and building them manually, see [Overview](/windows/apps/desktop/modernize/grant-identity-to-nonpackaged-apps-overview).
1414

15-
Starting in Windows 10, version 2004, you can grant package identity to an app simply by building and registering a *package with external location* with your app. Packaging with external location allows you to register a simple identity package in your existing installer without changing how or where you install your application. If you're familiar with full MSIX packaging, this is a much lighter-weight option as described below.
15+
This topic describes how to build and register an identity package manually. For info about building an identity package in Visual Studio, see [Grant package identity by packaging with external location in Visual Studio](/windows/apps/desktop/modernize/grant-identity-to-nonpackaged-apps-visual-studio).
1616

17-
To build and register an identity package, follow these steps:
17+
These are the steps (which this topic describes in detail) to build and register an identity package manually:
1818

1919
1. [Create a package manifest for the identity package](#create-a-package-manifest-for-the-identity-package)
2020
2. [Build and sign the identity package](#build-and-sign-the-identity-package)

hub/apps/get-started/windows-developer-faq.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ sections:
146146
See [Sample and resources](./samples.md). Some notable repositories:
147147
148148
- [WindowsAppSDK-Samples](https://github.com/microsoft/WindowsAppSDK-Samples): Demonstrates how to use specific Windows App SDK API sets.
149-
- [WinUI 3 Demos](https://github.com/microsoft/WinUI-3-Demos): Contains demos used during Microsoft's WinUI presentations.
149+
- [Windows topic-specific samples](https://github.com/MicrosoftDocs/windows-topic-specific-samples/tree/winui-3/tutorials/winui-notes): This branch contains a WinUI note sample project that is used in the [Create a WinUI app](/windows/apps/tutorials/winui-notes/) tutorial.
150150
- [WinUI Gallery](https://github.com/microsoft/WinUI-Gallery): Showcases WinUI and Windows App SDK. You can also get the [WinUI Gallery in the Microsoft Store](https://www.microsoft.com/store/productId/9P3JFPWWDZRC).
151151
- question: If I have already invested heavily in WPF, should I continue to use WPF or should I consider migrating to WinUI?
152152
answer: |

hub/apps/package-and-deploy/self-contained-deploy/deploy-self-contained-apps.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ A Windows App SDK project is framework-dependent by default. To switch to self-c
1414
* In the app project file, inside the main `PropertyGroup`, add `<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>` as shown in the screenshot below.
1515

1616
![Screenshot showing the WindowsAppSDKSelfContained property set in a project file.](../../images/winappsdk-self-contained.png)
17-
* For packaged projects, in the app project file, at the end of the file before the closing `</Project>`, add the `Target` shown below.
18-
19-
```
20-
<Target Name="_RemoveFrameworkReferences" BeforeTargets="_ConvertItems;_CalculateInputsForGenerateCurrentProjectAppxManifest">
21-
<ItemGroup>
22-
<FrameworkSdkReference Remove="@(FrameworkSdkReference)" Condition="$([System.String]::Copy('%(FrameworkSdkReference.SDKName)').StartsWith('Microsoft.WindowsAppRuntime.'))" />
23-
</ItemGroup>
24-
</Target>
25-
```
26-
27-
> [!NOTE]
28-
> This is a workaround for a bug in Windows App SDK 1.1 and will not be necessary with Windows App SDK 1.2. It is only required for packaged projects.
2917
* Save and close the project file.
3018
* Click **Reload Project**.
3119
* If you're using a **Windows Application Packaging Project** (rather than the single-project MSIX that you get with **Blank App, Packaged (WinUI 3 in Desktop)**), then make all of the above changes in the project file for the packaging project as well.

hub/apps/toc.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,14 @@ items:
460460
href: desktop/modernize/desktop-to-uwp-distribute.md
461461
- name: Package your app using single-project MSIX
462462
href: windows-app-sdk/single-project-msix.md
463-
- name: Grant package identity by packaging with external location in Visual Studio
464-
href: desktop/modernize/grant-identity-to-nonpackaged-apps-visual-studio.md
465-
- name: Grant package identity by packaging with external location manually
466-
href: desktop/modernize/grant-identity-to-nonpackaged-apps.md
463+
- name: Grant package identity by packaging with external location
464+
items:
465+
- name: Overview
466+
href: desktop/modernize/grant-identity-to-nonpackaged-apps-overview.md
467+
- name: Grant package identity by packaging with external location in Visual Studio
468+
href: desktop/modernize/grant-identity-to-nonpackaged-apps-visual-studio.md
469+
- name: Grant package identity by packaging with external location manually
470+
href: desktop/modernize/grant-identity-to-nonpackaged-apps.md
467471
- name: Deployment
468472
items:
469473
- name: Overview

0 commit comments

Comments
 (0)