Skip to content

Latest commit

 

History

History
192 lines (122 loc) · 10.2 KB

set-up-your-development-environment.md

File metadata and controls

192 lines (122 loc) · 10.2 KB
title description ms.topic ms.date keywords ms.author author ms.custom
Install tools for the Windows App SDK
Configure your development computer by installing the appropriate tools to develop apps for Windows by using the Windows App SDK.
how-to
12/12/2022
windows win32, windows app development, Windows App SDK, stable
stwhi
stevewhims
kr2b-contr-experiment

Install tools for the Windows App SDK

Configure your development computer by installing the appropriate tools to develop apps for Windows with the Windows App SDK and WinUI.

Note

This article is for the stable release channel of the Windows App SDK. See Windows App SDK release channels. For other channels, see Install tools for preview and experimental channels of the Windows App SDK.

Install tools with winget

To install the required tools and workloads using the command line, enter one of the following commands in the console. This is supported only with Visual Studio 2022 and later. If you already have Visual Studio 2022 or later installed, then the command will open Visual Studio Installer with any missing workloads selected. You can then select Modify in the Visual Studio Installer to install the required workloads.

For C# developers

winget install "Visual Studio Community 2022"  --override "--add Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cs" -s msstore
winget install "Visual Studio Enterprise 2022"  --override "--add Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cs"
winget install "Visual Studio Professional 2022"  --override "--add Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cs"

For C++ developers

winget install "Visual Studio Community 2022"  --override "--add Microsoft.VisualStudio.Workload.NativeDesktop  Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cpp"  -s msstore
winget install "Visual Studio Enterprise 2022"  --override "--add Microsoft.VisualStudio.Workload.NativeDesktop  Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cpp"  
winget install "Visual Studio Professional 2022"  --override "--add  Microsoft.VisualStudio.Workload.NativeDesktop  Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cpp" 

Install tools manually

To install the required tools and workloads manually, read the following sections.

Install Visual Studio

Use these links to install Visual Studio 2022 (recommended) or Visual Studio 2019. You can choose between the free Visual Studio Community Edition, Visual Studio Professional, or Visual Studio Enterprise. Before you begin, see System requirements for Windows app development.

Important

Visual Studio 2019 only supports Windows App SDK 1.1 and earlier. Visual Studio 2022 is recommended for developing apps with all versions of the Windows App SDK.

[!div class="button"] Download Visual Studio 2022

[!div class="button"] Download Visual Studio 2019

Required workloads and components

While installing Visual Studio, you have the option to install the workloads and components you want. After installation, you can open Visual Studio Installer and select Modify to add workloads and components.

While installing, select the following workloads and components:

From within the Visual Studio Installer app:

  • On the Workloads tab of the installation dialog box, select as appropriate:

    • For C# app development using the Windows App SDK, select .NET Desktop Development.
      • Then in the Installation details pane of the installation dialog box, select Windows App SDK C# Templates (at the bottom of the list).
    • For C++ app development using the Windows App SDK, select Desktop development with C++
      • Then in the Installation details pane of the installation dialog box, select Windows App SDK C++ Templates (at the bottom of the list).
  • For Universal Windows Platform (UWP) app development, select Universal Windows Platform development

    • Then in the Installation details pane of the installation dialog box for that workload, make sure C++ (v143) Universal Windows Platform tools is selected.
  • On the Individual components tab of the installation dialog box, in the SDKs, libraries, and frameworks section, make sure Windows 10 SDK (10.0.19041.0) is selected.

From within the Visual Studio Installer app:

  • On the Workloads tab of the installation dialog box, select as appropriate:

    • For C# app development using the Windows App SDK, select .NET Desktop Development.
    • For C++ app development using the Windows App SDK, select Desktop development with C++.
    • For Universal Windows Platform (UWP) app development, select Universal Windows Platform development.
      • Then in the Installation details pane of the installation dialog box for that workload, make sure either C++ (v143) Universal Windows Platform tools (for Visual Studio 2022) or C++ (v142) Universal Windows Platform tools (for Visual Studio 2019) is selected.
  • On the Individual components tab of the installation dialog box, in the SDKs, libraries, and frameworks section, make sure Windows 10 SDK (10.0.19041.0) is selected.


Visual Studio project and item templates

The Windows App SDK includes Visual Studio project and item templates for creating and developing apps that use the WinUI 3 library to implement the user interface.

If you followed the instructions in Required workloads and components above, then the templates are already installed.

Select C# or C++ as the language, Windows as the platform, and WinUI as the Project type to create a new Windows App SDK project.

Optionally, install Template Studio for WinUI (C#) to accelerate the creation of new .NET WinUI apps using a wizard-based UI. Select from a variety of project types and features to generate a project template customized for you.

The templates are available by installing a Visual Studio extension (VSIX).

Note

If you have a Windows App SDK Visual Studio extension (VSIX) already installed, then uninstall it before installing a new version. For directions, see Manage extensions for Visual Studio.

Download the extension directly, and install it:

[!div class="button"] Download latest C# stable release

[!div class="button"] Download latest C++ stable release

Important

Visual Studio 2019 only supports Windows App SDK 1.1 and earlier. Visual Studio 2022 is recommended for developing apps with all versions of the Windows App SDK.

The templates are available by installing a Visual Studio extension (VSIX).

Note

If you have a Windows App SDK Visual Studio extension (VSIX) already installed, then uninstall it before installing a new version. For directions, see Manage extensions for Visual Studio.

  • You can install the latest stable release VSIX from Visual Studio. Select Extensions > Manage Extensions, search for Windows App SDK, and download the Windows App SDK extension. Close and reopen Visual Studio, and follow the prompts to install the extension.
  • Alternatively, you can download the extension directly from Visual Studio Marketplace, and install it:

[!div class="button"] Download latest C# stable release

[!div class="button"] Download latest C++ stable release


For more versions of the Windows App SDK, see Downloads for the Windows App SDK.

Hybrid C/C++ runtime library linkage

In releases 1.0.3 and 1.1 Preview 2 and later, the Windows App SDK uses Hybrid C/C++ runtime library linkage (hybrid CRT linkage). This is a CRT linkage technique that simplifies deployment. Whether you're a C++ application developer or a C++ library developer, here are some resources for learning about hybrid CRT linkage:

Next steps

To create your first WinUI 3 app that uses the Windows App SDK, see Create your first WinUI 3 project.

Also see Use the Windows App SDK in an existing project.

Related topics