You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hub/apps/windows-app-sdk/single-project-msix.md
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,16 @@
2
2
title: Package your app using single-project MSIX
3
3
description: This article provides instructions for how to generate an MSIX desktop app via a single project in Visual Studio.
4
4
ms.topic: article
5
-
ms.date: 11/17/2022
5
+
ms.date: 01/10/2023
6
6
keywords: windows, win32, desktop development, Windows App SDK, msix, packaging project, single project, single project msix, winui 3
7
7
ms.localizationpriority: medium
8
8
---
9
9
10
10
# Package your app using single-project MSIX
11
11
12
-
Single-project MSIX is a feature that enables you to build a packaged WinUI 3 desktop app—using the Windows App SDK—without needing a separate packaging project. This feature is available as a Visual Studio extension that you can use for these scenarios:
12
+
Single-project MSIX is a feature that lets you build a packaged WinUI 3 desktop app without the need for a separate packaging project. A WinUI 3 app is one that uses the [Windows UI Library (WinUI) 3](/windows/apps/winui/winui3/) framework for its user interface (UI); and it uses the Windows App SDK. To package a desktop app that's *not* a WinUI 3 app, see [Set up your desktop application for MSIX packaging in Visual Studio](/windows/msix/desktop/desktop-to-uwp-packaging-dot-net).
13
+
14
+
The single-project MSIX feature is available as a Visual Studio extension that you can use for these scenarios:
13
15
14
16
- Create a *new* WinUI 3 desktop app using the **Blank App, Packaged (WinUI 3 in Desktop)** Visual Studio project template that comes with the Windows App SDK. That project is configured to build your app into an MSIX package without needing a separate packaging project.
15
17
- Modify an *existing* WinUI 3 desktop app that uses a separate packaging project. The modification involves removing the separate packaging project, as shown in the illustration below.
@@ -22,7 +24,7 @@ This section introduces some important details about the single-project MSIX fea
22
24
23
25
### Benefits
24
26
25
-
Before the introduction of the single-project MSIX feature, if you wanted to build a packaged WinUI 3 desktop app, then you needed two projects in your solution—your app project, and a separate [Windows Application Packaging Project](/windows/msix/desktop/desktop-to-uwp-packaging-dot-net). The single-project MSIX feature enables you to develop and build your app using only an app project. That provides a cleaner project structure and a more straightforward development experience. For example, you no longer need to select the separate packaging project as your startup project.
27
+
Before the introduction of the single-project MSIX feature, if you wanted to build a packaged WinUI 3 desktop app, then you needed two projects in your solution—your app project, plus an additional **Windows Application Packaging Project** (see [Set up your desktop application for MSIX packaging in Visual Studio](/windows/msix/desktop/desktop-to-uwp-packaging-dot-net)). The single-project MSIX feature enables you to develop and build your app using only a project for your app. That provides a cleaner project structure and a more straightforward development experience. For example, you no longer need to select the separate packaging project as your startup project.
26
28
27
29
### Supported project types
28
30
@@ -56,7 +58,7 @@ Follow the steps in this section to modify an existing WinUI 3-based app that us
56
58
57
59
### Step 1: Create or open an existing packaging project
58
60
59
-
If you already have a solution for a WinUI 3 desktop app (see [WinUI 3 templates in Visual Studio](../winui/winui3/winui-project-templates-in-visual-studio.md)) that includes a separate [Windows Application Packaging Project](/windows/msix/desktop/desktop-to-uwp-packaging-dot-net), then open that solution in Visual Studio now.
61
+
If you already have a solution for a WinUI 3 desktop app (see [WinUI 3 templates in Visual Studio](../winui/winui3/winui-project-templates-in-visual-studio.md)) that includes a **Windows Application Packaging Project** (see [Set up your desktop application for MSIX packaging in Visual Studio](/windows/msix/desktop/desktop-to-uwp-packaging-dot-net)), then open that solution in Visual Studio now.
60
62
61
63
If not, then create a new WinUI 3 desktop app in Visual Studio by using the **Blank App, Packaged with Windows Application Packaging Project (WinUI 3 in Desktop)** template. Your solution will look similiar to the screenshot below.
62
64
@@ -207,7 +209,7 @@ Use the [Package & Publish command in Visual Studio](/windows/msix/package/packa
207
209
208
210
## Automate building and packaging your single-project MSIX app
209
211
210
-
You can use `msbuild` to build and package your single-project MSIX app, thereby allowing you to automate the workflow. The technique for a single-project solution, and the command-line, is only slightly different from what you might already be doing if you have a two-project solution (one that has a [Windows Application Packaging Project](/windows/msix/desktop/desktop-to-uwp-packaging-dot-net)).
212
+
You can use `msbuild` to build and package your single-project MSIX app, thereby allowing you to automate the workflow. The technique for a single-project solution, and the command-line, is only slightly different from what you might already be doing if you have a two-project solution—one that has a **Windows Application Packaging Project** (see [Set up your desktop application for MSIX packaging in Visual Studio](/windows/msix/desktop/desktop-to-uwp-packaging-dot-net)).
211
213
212
214
The important build command option for a single-project solution is `/p:GenerateAppxPackageOnBuild=true`. Without that option, the project will build, but you won't get an MSIX package. Include that option, and that will cause the MSIX package to be generated.
Copy file name to clipboardExpand all lines: hub/apps/windows-app-sdk/use-windows-app-sdk-run-time.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Use the Windows App SDK runtime for apps packaged with external location or unpackaged
3
3
description: If your app isn't installed by using MSIX (that is, it's packaged with external location or unpackaged), then you must initialize the Windows App SDK for use before you can call Windows App SDK features such as WinUI 3, App Lifecycle, MRT Core, and DWriteCore.
4
4
ms.topic: article
5
-
ms.date: 11/16/2022
5
+
ms.date: 01/10/2023
6
6
ms.author: stwhi
7
7
author: stevewhims
8
8
ms.localizationpriority: medium
@@ -16,9 +16,9 @@ ms.localizationpriority: medium
16
16
If your app isn't installed by using MSIX (that is, it's packaged with external location or unpackaged), then you must initialize the Windows App SDK for use before you can call Windows App SDK features such as WinUI 3, App Lifecycle, MRT Core, and DWriteCore. Your app must initialize the Windows App SDK runtime before using any other feature of the Windows App SDK.
17
17
18
18
* Beginning in Windows App SDK 1.0, that can be done automatically when your app starts via auto-initialization (set the project property `<WindowsPackageType>None</WindowsPackageType>`). For a demonstration, see [Create your first WinUI 3 project](../winui/winui3/create-your-first-winui3-app.md).
19
-
*If you have advanced needs (such as handling errors by showing your own custom UI or logging, or if you need to load a version of the Windows App SDK that's different from the version you built with), then you can instead call the bootstrapper API explicitly. More info about that in this topic.
19
+
*But if you have advanced needs (such as handling errors by showing your own custom UI or logging, or if you need to load a version of the Windows App SDK that's different from the version you built with), then continue reading this topic. In those scenarios, instead of auto-initialization, you can call the bootstrapper API explicitly.
20
20
21
-
Either of those techniques allows an app that doesn't use MSIX to take a dynamic dependency on the Windows App SDK at run time.
21
+
Either of the two techniques above allows an app that doesn't use MSIX to take a dynamic dependency on the Windows App SDK at run time.
22
22
23
23
For background information about dynamic dependencies, see [MSIX framework packages and dynamic dependencies](../desktop/modernize/framework-packages/framework-packages-overview.md).
0 commit comments