Skip to content

Commit b593245

Browse files
Ben HillisCopilot
andcommitted
Replace setup-dev-env.ps1 with WinGet configuration file
Replace the PowerShell prerequisite checker with a declarative WinGet configuration file (.config/configuration.winget) that installs all build prerequisites automatically: - Developer Mode (via Microsoft.Windows.Settings/WindowsSettings) - CMake (via WinGet package Kitware.CMake) - Visual Studio 2022 Community (via WinGet package) - VS components from .vsconfig (via Microsoft.VisualStudio.DSC/VSComponents) Usage: winget configure .config\configuration.winget Follows the convention used by Terminal, PowerToys, and winget-cli. Drop the Azure Artifacts Credential Provider check (public feed). Update dev-loop.md to reference winget configure as the primary setup method, with manual install steps in a collapsed details block. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ddb5271 commit b593245

File tree

3 files changed

+64
-243
lines changed

3 files changed

+64
-243
lines changed

.config/configuration.winget

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
2+
# Reference: https://github.com/microsoft/WSL/blob/master/doc/docs/dev-loop.md
3+
#
4+
# Usage:
5+
# winget configure .config\configuration.winget
6+
#
7+
# This configuration installs all prerequisites for building WSL.
8+
# It is idempotent — safe to run multiple times.
9+
properties:
10+
resources:
11+
- resource: Microsoft.Windows.Settings/WindowsSettings
12+
directives:
13+
description: Enable Developer Mode (required for symbolic link support)
14+
allowPrerelease: true
15+
securityContext: elevated
16+
settings:
17+
DeveloperMode: true
18+
- resource: Microsoft.WinGet.DSC/WinGetPackage
19+
id: cmake
20+
directives:
21+
description: Install CMake
22+
securityContext: elevated
23+
settings:
24+
id: Kitware.CMake
25+
source: winget
26+
- resource: Microsoft.WinGet.DSC/WinGetPackage
27+
id: vsPackage
28+
directives:
29+
description: Install Visual Studio 2022 Community (any edition is OK)
30+
securityContext: elevated
31+
settings:
32+
id: Microsoft.VisualStudio.2022.Community
33+
source: winget
34+
- resource: Microsoft.VisualStudio.DSC/VSComponents
35+
dependsOn:
36+
- vsPackage
37+
directives:
38+
description: Install required VS workloads from .vsconfig
39+
allowPrerelease: true
40+
securityContext: elevated
41+
settings:
42+
productId: Microsoft.VisualStudio.Product.Community
43+
channelId: VisualStudio.17.Release
44+
vsConfigFile: '${WinGetConfigRoot}\..\.vsconfig'
45+
configurationVersion: 0.2.0

doc/docs/dev-loop.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,29 @@
22

33
## Prerequisites
44

5-
You can verify all prerequisites are installed by running `tools\setup-dev-env.ps1`.
5+
All prerequisites can be installed automatically with a single command:
66

7-
The following tools are required to build WSL:
7+
```
8+
winget configure .config\configuration.winget
9+
```
10+
11+
This installs CMake, Visual Studio 2022 with the required components (via [`.vsconfig`](https://github.com/microsoft/WSL/blob/master/.vsconfig)), and enables Developer Mode. The configuration is idempotent — safe to run multiple times.
12+
13+
See [WinGet Configuration](https://learn.microsoft.com/windows/package-manager/configuration/) for more details.
14+
15+
<details>
16+
<summary>Manual installation</summary>
17+
18+
If you prefer to install prerequisites manually:
819

920
- CMake >= 3.25
1021
- Can be installed with `winget install Kitware.CMake`
11-
- Visual Studio with the following components (install via [`.vsconfig`](https://github.com/microsoft/WSL/blob/master/.vsconfig) — use VS Installer → More → Import configuration, or `winget install Microsoft.VisualStudio.2022.Community --override "--wait --quiet --config .vsconfig"`):
12-
- Windows SDK 26100
13-
- MSBuild
14-
- Universal Windows platform support for v143 build tools (X64 and ARM64)
15-
- MSVC v143 - VS 2022 C++ ARM64 build tools (Latest + Spectre) (X64 and ARM64)
16-
- C++ core features
17-
- C++ ATL for latest v143 tools (X64 and ARM64)
18-
- C++ Clang compiler for Windows
19-
- .NET desktop development
20-
- .NET WinUI app development tools
21-
22-
- Building WSL requires support for symbolic links. To ensure this capability, enable [Developer Mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) in Windows Settings or execute the build process with Administrator privileges.
22+
- Visual Studio 2022 with the required components:
23+
- Use VS Installer → More → Import configuration and select [`.vsconfig`](https://github.com/microsoft/WSL/blob/master/.vsconfig)
24+
- Or: `winget install Microsoft.VisualStudio.2022.Community --override "--wait --quiet --config .vsconfig"`
25+
- Enable [Developer Mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) in Windows Settings (required for symbolic link support)
26+
27+
</details>
2328

2429
### ARM64 development
2530

tools/setup-dev-env.ps1

Lines changed: 0 additions & 229 deletions
This file was deleted.

0 commit comments

Comments
 (0)