diff --git a/images/win/scripts/Installers/Install-WDK.ps1 b/images/win/scripts/Installers/Install-WDK.ps1 index d92d0d3a3..668256988 100644 --- a/images/win/scripts/Installers/Install-WDK.ps1 +++ b/images/win/scripts/Installers/Install-WDK.ps1 @@ -15,7 +15,7 @@ if (Test-IsWin22) { $FilePath = "C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix" $VSver = "2019" } 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") @@ -29,11 +29,7 @@ if (Test-IsWin19) { Install-Binary -Url $wdkUrl -Name "wdksetup.exe" -ArgumentList $argumentList # Need to install the VSIX to get the build targets when running VSBuild -# Windows 2022 - Skip installation due to a regression -# https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk -if (Test-IsWin19) { - $FilePath = Resolve-Path -Path $FilePath - Install-VsixExtension -FilePath $FilePath -Name "WDK.vsix" -VSversion $VSver -InstallOnly -} +$FilePath = Resolve-Path -Path $FilePath +Install-VsixExtension -FilePath $FilePath -Name "WDK.vsix" -VSversion $VSver -InstallOnly Invoke-PesterTests -TestFile "WDK" diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 index f278098dc..9a1bdd825 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 @@ -38,45 +38,24 @@ function Get-VisualStudioExtensions { } } - # SDK - if (Test-IsWin19) { - $sdkVersion = Get-SDKVersion - $sdkPackages = @( - @{Package = 'Windows Software Development Kit'; Version = $sdkVersion} - ) - } + $sdkVersion = Get-SDKVersion + $sdkPackages = @( + @{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 - $wdkVersion = Get-WDKVersion - $wdkExtensionVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit' - $wdkPackages = @( - @{Package = 'Windows Driver Kit'; Version = $wdkVersion} - @{Package = 'Windows Driver Kit Visual Studio Extension'; Version = $wdkExtensionVersion} - ) - } - - if (Test-IsWin22) { - # WDK - $wdkVersion = Get-WDKVersion - $wdkPackages = @( - @{Package = 'Windows Driver Kit'; Version = $wdkVersion} - ) - } + # WDK + $wdkVersion = Get-WDKVersion + $wdkExtensionVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit' + $wdkPackages = @( + @{Package = 'Windows Driver Kit'; Version = $wdkVersion} + @{Package = 'Windows Driver Kit Visual Studio Extension'; Version = $wdkExtensionVersion} + ) $extensions = @( $vsixs $ssdtPackages $sdkPackages - $wixPackages $wdkPackages ) diff --git a/images/win/scripts/Tests/WDK.Tests.ps1 b/images/win/scripts/Tests/WDK.Tests.ps1 index b58d018a1..6a5e61ddc 100644 --- a/images/win/scripts/Tests/WDK.Tests.ps1 +++ b/images/win/scripts/Tests/WDK.Tests.ps1 @@ -6,7 +6,7 @@ Describe "WDK" { $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 | Should -Not -BeNullOrEmpty }