@@ -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
1619function 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) ---
6265if ($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 ---
8689Write-Host " "
8790Write-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