Windows App SDK Installation
This guide provides step-by-step instructions to install the Windows App SDK, enabling you to build modern Windows applications using the latest platform features.
Prerequisites
- Windows 11 or Windows 10 (version 1903 or later).
- Visual Studio 2022 (version 17.0 or later) with the "Desktop development with C++" and ".NET desktop development" workloads installed.
- Ensure the latest SDKs and build tools are installed via the Visual Studio Installer.
Installation Steps
-
Open Visual Studio Installer:
Search for "Visual Studio Installer" in the Windows search bar and launch it.
-
Modify Visual Studio Installation:
Locate your installed Visual Studio 2022 instance and click the "Modify" button.
-
Install Required Workloads:
On the "Workloads" tab, ensure the following are checked:
- Desktop development with C++
- .NET desktop development
If they are not already installed, select them and click "Modify" at the bottom of the installer window.
-
Install Windows App SDK Components:
After the workloads are installed or verified, navigate to the "Individual components" tab in the Visual Studio Installer. Search for "Windows App SDK" and ensure the latest stable version is selected for installation. This typically includes:
Windows App SDK Runtime
Windows App SDK for WinUI 3
Click "Modify" to install these components.
-
Verify Installation:
Once the installation is complete, restart Visual Studio. You can create a new project and search for templates like "Blank App, Packaged (WinUI)" or "C++ Console App" to confirm that the Windows App SDK is available.
Installing via NuGet Package Manager
You can also add the Windows App SDK components to an existing project using the NuGet Package Manager:
- Right-click on your project in Solution Explorer.
- Select "Manage NuGet Packages...".
- Go to the "Browse" tab.
- Search for
Microsoft.WindowsAppSDK
. - Select the package and click "Install".
This will install the core SDK and its dependencies.
Troubleshooting Common Issues
- Missing Templates: If you don't see Windows App SDK project templates, ensure you have selected the correct workloads and individual components in the Visual Studio Installer and restarted Visual Studio.
- Runtime Errors: Make sure the Windows App SDK Runtime is installed and compatible with your target Windows version. Check the Windows App SDK Release Notes for compatibility information.
- Build Errors: Verify that your project's target framework and SDK settings are correctly configured for the Windows App SDK.