title | description | ms.topic | ms.date | ms.localizationpriority |
---|---|---|---|---|
Project properties | This topic describes the project properties that you can set in your Visual Studio project file to customize how your app is deployed. | article | 11/17/2022 | medium |
This topic describes the project properties that you can set in your Visual Studio project file to customize how your app is deployed.
Property name and description | Values | For more info |
---|---|---|
AppxPackage. Specifies whether or not a WinUI 3 app is packaged. | false (for an unpackaged app), or absent (for a packaged app) | Create a new project for an unpackaged WinUI 3 desktop app |
EnableMsixTooling. Enables the single-project MSIX feature for a project. | true (to enable), or absent (to disable) | Package your app using single-project MSIX |
UseWinUI. Specifies whether you're using the WinUI 3 user interface framework in your app. | true, or absent (for false) | WinUI in the Windows App SDK (WinUI 3) |
WindowsAppSdkBootstrapInitialize. Determines whether or not the Windows App SDK leverages module initializers to call the bootstrapper API automatically at app startup. | true (the default for executables), false (the default for non-executables) | Opting out of (or into) automatic module initialization |
WindowsAppSdkSelfContained. Determines whether or not an app is deployed self-contained. | true, or absent (for false) | Windows App SDK deployment guide for self-contained apps |
WindowsAppSdkUndockedRegFreeWinRTInitialize. Determines whether or not the Windows App SDK's implementation of undocked registration-free Windows Runtime (UndockedRegFreeWinRT) is enabled automatically at app startup. | true (the default for executables), false (the default for non-executables) | Opting out of (or into) automatic UndockedRegFreeWinRT support |
WindowsPackageType. Setting <WindowsPackageType>None</WindowsPackageType> for an unpackaged app causes the auto-initializer to locate and load a version of the Windows App SDK version that's most appropriate for your app. | None, or absent (to disable the auto-initializer) | Create a new project for an unpackaged WinUI 3 desktop app Behind the scenes, and opting out of automatic module initialization |
Here's an excerpt from a typical .csproj
file for a C# WinUI 3 project showing some of the project properties from the table above in use.
... <ProjectSdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net8.0-windows10.0.19041.0</TargetFramework> <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion> ... <UseWinUI>true</UseWinUI> <EnableMsixTooling>true</EnableMsixTooling> </PropertyGroup> ...