[Windows] use VsixInstaller from the installer (#8103)

This commit is contained in:
Mikhail Koliada
2023-08-17 10:12:47 +02:00
committed by GitHub
parent e6705a3f9c
commit a951af97cd
3 changed files with 6 additions and 16 deletions

View File

@@ -8,12 +8,10 @@ if (Test-IsWin22) {
# SDK available through Visual Studio
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2196230"
$FilePath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2022\*\WDK.vsix"
$VSver = "2022"
} elseif (Test-IsWin19) {
$winSdkUrl = "https://go.microsoft.com/fwlink/?linkid=2173743"
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2166289"
$FilePath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix"
$VSver = "2019"
} else {
throw "Invalid version of Visual Studio is found. Either 2019 or 2022 are required"
}
@@ -30,6 +28,6 @@ Install-Binary -Url $wdkUrl -Name "wdksetup.exe" -ArgumentList $argumentList
# Need to install the VSIX to get the build targets when running VSBuild
$FilePath = Resolve-Path -Path $FilePath
Install-VsixExtension -FilePath $FilePath -Name "WDK.vsix" -VSversion $VSver -InstallOnly
Install-VsixExtension -FilePath $FilePath -Name "WDK.vsix" -InstallOnly
Invoke-PesterTests -TestFile "WDK"