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.
-
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.
-
Install Windows platform dependencies:
The required C++ toolchain and Windows SDK are installed as part of Visual Studio 2022. The instructions below are for the Community edition, but you may want to use a different Visual Studio edition based 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 --add Microsoft.VisualStudio.Component.VC.Tools.ARM64"
-
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