Skip to content

Commit 35ebedf

Browse files
Ben HillisCopilot
andcommitted
Add .vsconfig and winget install instructions for VS components
Add .vsconfig listing all required Visual Studio workloads and components (MSVC v143, ARM64, Spectre, ATL, Clang, UWP, WinUI, Windows SDK 26100, .NET desktop). Update setup-dev-env.ps1 fix messages to reference the .vsconfig via VS Installer import or winget --override. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b107262 commit 35ebedf

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

.vsconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "1.0",
3+
"components": [
4+
"Microsoft.Component.MSBuild",
5+
"Microsoft.VisualStudio.Component.VC.CoreIde",
6+
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
7+
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
8+
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64.Spectre",
9+
"Microsoft.VisualStudio.Component.VC.Tools.ARM64.Spectre",
10+
"Microsoft.VisualStudio.Component.VC.ATL",
11+
"Microsoft.VisualStudio.Component.VC.ATL.ARM64",
12+
"Microsoft.VisualStudio.Component.VC.ATL.Spectre",
13+
"Microsoft.VisualStudio.Component.VC.ATL.ARM64.Spectre",
14+
"Microsoft.VisualStudio.Component.VC.Llvm.Clang",
15+
"Microsoft.VisualStudio.Component.Windows11SDK.26100",
16+
"Microsoft.VisualStudio.Component.UWP.VC.ARM64",
17+
"Microsoft.VisualStudio.Workload.ManagedDesktop",
18+
"Microsoft.VisualStudio.Workload.Universal",
19+
"Microsoft.VisualStudio.Workload.NativeDesktop"
20+
]
21+
}

tools/setup-dev-env.ps1

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Set-StrictMode -Version Latest
1212
$ErrorActionPreference = "Stop"
1313

1414
$script:Errors = 0
15+
$script:RepoRoot = (Resolve-Path "$PSScriptRoot\..").Path
16+
$script:VsConfigPath = Join-Path $script:RepoRoot ".vsconfig"
17+
$script:VsInstallFix = "Import .vsconfig via VS Installer -> More -> Import configuration, or: winget install Microsoft.VisualStudio.2022.Community --override ""--wait --quiet --config $script:VsConfigPath"""
1518

1619
function Check($Name, $Result, $Fix, [switch]$Optional)
1720
{
@@ -56,7 +59,7 @@ if (Test-Path $vswhere)
5659
{
5760
$vsInstall = & $vswhere -latest -property installationPath 2>$null
5861
}
59-
Check "Visual Studio 2022+" ($null -ne $vsInstall) "Install Visual Studio 2022: https://visualstudio.microsoft.com/"
62+
Check "Visual Studio 2022+" ($null -ne $vsInstall) $script:VsInstallFix
6063

6164
# --- VS Components (only check if VS is found) ---
6265
if ($vsInstall)
@@ -69,24 +72,24 @@ if ($vsInstall)
6972

7073
# Check for specific required components via their markers
7174
$clangPath = Join-Path $vsInstall "VC\Tools\Llvm\x64\bin\clang-format.exe"
72-
Check "C++ Clang Compiler for Windows" (Test-Path $clangPath) "VS Installer -> Modify -> Individual Components -> C++ Clang Compiler for Windows"
75+
Check "C++ Clang Compiler for Windows" (Test-Path $clangPath) $script:VsInstallFix
7376

7477
$atlPath = Get-ChildItem -Path (Join-Path $vsInstall "VC\Tools\MSVC") -Filter "atlbase.h" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
75-
Check "C++ ATL for latest v143 tools" ($null -ne $atlPath) "VS Installer -> Modify -> Individual Components -> C++ ATL for latest v143 build tools"
78+
Check "C++ ATL for latest v143 tools" ($null -ne $atlPath) $script:VsInstallFix
7679

7780
$msbuild = Get-Command "msbuild" -ErrorAction SilentlyContinue
7881
if (-not $msbuild)
7982
{
8083
$msbuild = Get-ChildItem -Path $vsInstall -Filter "MSBuild.exe" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
8184
}
82-
Check "MSBuild" ($null -ne $msbuild) "VS Installer -> Modify -> Individual Components -> MSBuild"
85+
Check "MSBuild" ($null -ne $msbuild) $script:VsInstallFix
8386
}
8487

8588
# --- Windows SDK ---
8689
Write-Host ""
8790
Write-Host "Windows SDK:" -ForegroundColor White
8891
$sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.26100.0"
89-
Check "Windows SDK 26100" (Test-Path $sdkPath) "VS Installer -> Modify -> Individual Components -> Windows 11 SDK (10.0.26100.0)"
92+
Check "Windows SDK 26100" (Test-Path $sdkPath) $script:VsInstallFix
9093

9194
# --- NuGet Credential Provider (Azure DevOps feed) ---
9295
# nuget.exe resolves credential provider plugins using a priority chain:

0 commit comments

Comments
 (0)