mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
Install WDK.vsix on VS 2022 (#6203)
This commit is contained in:
committed by
GitHub
parent
3414173a17
commit
03c71fa649
@@ -15,7 +15,7 @@ if (Test-IsWin22) {
|
|||||||
$FilePath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix"
|
$FilePath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix"
|
||||||
$VSver = "2019"
|
$VSver = "2019"
|
||||||
} else {
|
} else {
|
||||||
throw "Invalid version of Visual Studio is found. Either 2017,2019 or 2022 are required"
|
throw "Invalid version of Visual Studio is found. Either 2019 or 2022 are required"
|
||||||
}
|
}
|
||||||
|
|
||||||
$argumentList = ("/features", "+", "/quiet")
|
$argumentList = ("/features", "+", "/quiet")
|
||||||
@@ -29,11 +29,7 @@ if (Test-IsWin19) {
|
|||||||
Install-Binary -Url $wdkUrl -Name "wdksetup.exe" -ArgumentList $argumentList
|
Install-Binary -Url $wdkUrl -Name "wdksetup.exe" -ArgumentList $argumentList
|
||||||
|
|
||||||
# Need to install the VSIX to get the build targets when running VSBuild
|
# Need to install the VSIX to get the build targets when running VSBuild
|
||||||
# Windows 2022 - Skip installation due to a regression
|
$FilePath = Resolve-Path -Path $FilePath
|
||||||
# https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
|
Install-VsixExtension -FilePath $FilePath -Name "WDK.vsix" -VSversion $VSver -InstallOnly
|
||||||
if (Test-IsWin19) {
|
|
||||||
$FilePath = Resolve-Path -Path $FilePath
|
|
||||||
Install-VsixExtension -FilePath $FilePath -Name "WDK.vsix" -VSversion $VSver -InstallOnly
|
|
||||||
}
|
|
||||||
|
|
||||||
Invoke-PesterTests -TestFile "WDK"
|
Invoke-PesterTests -TestFile "WDK"
|
||||||
|
|||||||
@@ -38,22 +38,11 @@ function Get-VisualStudioExtensions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# SDK
|
# SDK
|
||||||
if (Test-IsWin19) {
|
|
||||||
$sdkVersion = Get-SDKVersion
|
$sdkVersion = Get-SDKVersion
|
||||||
$sdkPackages = @(
|
$sdkPackages = @(
|
||||||
@{Package = 'Windows Software Development Kit'; Version = $sdkVersion}
|
@{Package = 'Windows Software Development Kit'; Version = $sdkVersion}
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
if (Test-IsWin19) {
|
|
||||||
# Wix
|
|
||||||
$vs = (Get-VisualStudioVersion).Name.Split()[-1]
|
|
||||||
$wixExtensionVersion = ($vsPackages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version
|
|
||||||
$wixPackages = @(
|
|
||||||
@{Package = "WIX Toolset Studio $vs Extension"; Version = $wixExtensionVersion}
|
|
||||||
)
|
|
||||||
|
|
||||||
# WDK
|
# WDK
|
||||||
$wdkVersion = Get-WDKVersion
|
$wdkVersion = Get-WDKVersion
|
||||||
@@ -62,21 +51,11 @@ function Get-VisualStudioExtensions {
|
|||||||
@{Package = 'Windows Driver Kit'; Version = $wdkVersion}
|
@{Package = 'Windows Driver Kit'; Version = $wdkVersion}
|
||||||
@{Package = 'Windows Driver Kit Visual Studio Extension'; Version = $wdkExtensionVersion}
|
@{Package = 'Windows Driver Kit Visual Studio Extension'; Version = $wdkExtensionVersion}
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
if (Test-IsWin22) {
|
|
||||||
# WDK
|
|
||||||
$wdkVersion = Get-WDKVersion
|
|
||||||
$wdkPackages = @(
|
|
||||||
@{Package = 'Windows Driver Kit'; Version = $wdkVersion}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
$extensions = @(
|
$extensions = @(
|
||||||
$vsixs
|
$vsixs
|
||||||
$ssdtPackages
|
$ssdtPackages
|
||||||
$sdkPackages
|
$sdkPackages
|
||||||
$wixPackages
|
|
||||||
$wdkPackages
|
$wdkPackages
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Describe "WDK" {
|
|||||||
$WDKVersion | Should -Not -BeNullOrEmpty
|
$WDKVersion | Should -Not -BeNullOrEmpty
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Windows Driver Kit VSIX extension" -Skip:(Test-IsWin22) {
|
It "Windows Driver Kit VSIX extension" {
|
||||||
$version = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit"
|
$version = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit"
|
||||||
$version | Should -Not -BeNullOrEmpty
|
$version | Should -Not -BeNullOrEmpty
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user