Installation via Windows Package Manager

Windows Package Manager (aka WinGet) comes pre-installed with Windows 11 (21H2 and later). It can also be found in the Microsoft Store or be installed directly.

  1. Enable Developer Mode:

    In order to develop applications, particularly with the Swift Package Manager, you will need to enable developer mode. Please see Microsoft’s documentation for instructions about how to enable developer mode.

  2. Install required Visual Studio components:

    Install the latest MSVC toolset and Windows 11 SDK (10.0.22000) through Visual Studio 2022 Community installer. You may change the Visual Studio edition depending on your usage and team size.

    winget install --id Microsoft.VisualStudio.2022.Community --exact --force --custom "--add Microsoft.VisualStudio.Component.Windows11SDK.22000 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
    
  3. Install Swift and other dependencies:

    Install the latest Swift developer package, as well as compatible Git and Python tools if they don’t exist.

    winget install --id Swift.Toolchain -e