From f160c496ffa5afeee12d2c4a089cc5188a79d6be Mon Sep 17 00:00:00 2001 From: Nikolay Frolov <90333448+nikolai-frolov@users.noreply.github.com> Date: Mon, 7 Feb 2022 20:53:07 +0300 Subject: [PATCH] [Windows] Add Windows10SDK.17763 to Win22 (#4980) --- images/win/scripts/Installers/Install-VS.ps1 | 8 ++++++++ .../scripts/SoftwareReport/SoftwareReport.Generator.ps1 | 6 ++++++ .../SoftwareReport/SoftwareReport.VisualStudio.psm1 | 8 ++++++++ images/win/scripts/Tests/VisualStudio.Tests.ps1 | 6 ++++++ 4 files changed, 28 insertions(+) diff --git a/images/win/scripts/Installers/Install-VS.ps1 b/images/win/scripts/Installers/Install-VS.ps1 index 2017dbb81..0f4550e4e 100644 --- a/images/win/scripts/Installers/Install-VS.ps1 +++ b/images/win/scripts/Installers/Install-VS.ps1 @@ -44,4 +44,12 @@ if (Test-IsWin19) { Install-Binary -Url $sdkUrl -Name $sdkFileName -ArgumentList $argumentList } +if (Test-IsWin22) { + # Install Windows 10 SDK version 10.0.17763 + $sdkUrl = "https://go.microsoft.com/fwlink/p/?LinkID=2033908" + $sdkFileName = "sdksetup17763.exe" + $argumentList = ("/q", "/norestart", "/ceip off", "/features OptionId.UWPManaged OptionId.UWPCPP OptionId.UWPLocalized OptionId.DesktopCPPx86 OptionId.DesktopCPPx64 OptionId.DesktopCPParm64") + Install-Binary -Url $sdkUrl -Name $sdkFileName -ArgumentList $argumentList +} + Invoke-PesterTests -TestFile "VisualStudio" diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 13ec85561..cdff2962a 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -244,6 +244,12 @@ $markdown += New-MDHeader "Microsoft Visual C++:" -Level 4 $markdown += Get-VisualCPPComponents | New-MDTable $markdown += New-MDNewLine +$markdown += New-MDHeader "Installed Windows SDKs" -Level 4 +$sdk = Get-WindowsSDKs +$markdown += "``Location $($sdk.Path)``" +$markdown += New-MDNewLine +$markdown += New-MDList -Lines $sdk.Versions -Style Unordered + $markdown += New-MDHeader ".NET Core SDK" -Level 3 $sdk = Get-DotnetSdks $markdown += "``Location $($sdk.Path)``" diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 index dc3dc031d..b085433c3 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 @@ -88,4 +88,12 @@ function Get-VisualStudioExtensions { $extensions | Foreach-Object { [PSCustomObject]$_ } | Select-Object Package, Version | Sort-Object Package +} + +function Get-WindowsSDKs { + $path = "${env:ProgramFiles(x86)}\Windows Kits\10\Extension SDKs\WindowsDesktop" + return [PSCustomObject]@{ + Path = $path + Versions = $(Get-ChildItem $path).Name + } } \ No newline at end of file diff --git a/images/win/scripts/Tests/VisualStudio.Tests.ps1 b/images/win/scripts/Tests/VisualStudio.Tests.ps1 index a9f02cfa3..e60fce92b 100644 --- a/images/win/scripts/Tests/VisualStudio.Tests.ps1 +++ b/images/win/scripts/Tests/VisualStudio.Tests.ps1 @@ -22,4 +22,10 @@ Describe "Visual Studio" { $installedComponents | Should -Contain $ComponentName } } +} + +Describe "Windows 10 SDK" { + It "Verifies 17763 SDK is installed" -Skip:((Test-IsWin16) -or (Test-IsWin19)) { + "${env:ProgramFiles(x86)}\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.17763.0\UAP.props" | Should -Exist + } } \ No newline at end of file