From 3d827a6413bfd5bc0bd0bc94b7ef7c0bcf55113d Mon Sep 17 00:00:00 2001 From: Medeni Baykal <433724+Haplois@users.noreply.github.com> Date: Fri, 25 Jun 2021 11:37:23 +0200 Subject: [PATCH] Added SDK intall script --- scripts/Install-WindowsSDK.ps1 | 34 +++++++++++++++++++ scripts/PortableToFullPdb.ps1 | 4 ++- scripts/verify-sign.ps1 | 4 ++- scripts/write-release-notes.ps1 | 3 ++ .../Automation.CLI/CLITestBase.common.cs | 2 +- 5 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 scripts/Install-WindowsSDK.ps1 diff --git a/scripts/Install-WindowsSDK.ps1 b/scripts/Install-WindowsSDK.ps1 new file mode 100644 index 0000000000..9241f6bf33 --- /dev/null +++ b/scripts/Install-WindowsSDK.ps1 @@ -0,0 +1,34 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. + +function Write-Log ([string] $message, $messageColor = "Green") { + $currentColor = $Host.UI.RawUI.ForegroundColor + $Host.UI.RawUI.ForegroundColor = $messageColor + if ($message) { + Write-Output "... $message" + } + $Host.UI.RawUI.ForegroundColor = $currentColor +} + +Push-Location +try { + Write-Log "Downloading the Windows SDK 10.0.14393.795..." + Invoke-WebRequest -Method Get -Uri https://go.microsoft.com/fwlink/p/?LinkId=838916 -OutFile sdksetup.exe -UseBasicParsing + + Write-Log "Installing the Windows SDK, setup might request elevation please approve." + $process = Start-Process -Wait sdksetup.exe -ArgumentList "/quiet", "/norestart", "/ceip off", "/features OptionId.WindowsSoftwareDevelopmentKit" -PassThru + Remove-Item sdksetup.exe -Force + + if($process.ExitCode -eq 0) + { + Write-Log "Done" + } + else + { + Write-Log "Failed (Exit code: $($process.ExitCode))" -messageColor "Red" + } +} +finally { + Pop-Location +} + diff --git a/scripts/PortableToFullPdb.ps1 b/scripts/PortableToFullPdb.ps1 index d9b1f5fbe6..ce9de17256 100644 --- a/scripts/PortableToFullPdb.ps1 +++ b/scripts/PortableToFullPdb.ps1 @@ -1,4 +1,6 @@ -# Copyright (c) Microsoft. All rights reserved. +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. + # Portable to Full PDB conversion script for Test Platform. [CmdletBinding()] diff --git a/scripts/verify-sign.ps1 b/scripts/verify-sign.ps1 index 8da29e1374..5f34d67315 100644 --- a/scripts/verify-sign.ps1 +++ b/scripts/verify-sign.ps1 @@ -1,4 +1,6 @@ -# Copyright (c) Microsoft. All rights reserved. +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. + # Build script for Test Platform. [CmdletBinding()] diff --git a/scripts/write-release-notes.ps1 b/scripts/write-release-notes.ps1 index 81c33004d6..a2332a986d 100644 --- a/scripts/write-release-notes.ps1 +++ b/scripts/write-release-notes.ps1 @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. + [CmdletBinding()] param ( diff --git a/test/E2ETests/Automation.CLI/CLITestBase.common.cs b/test/E2ETests/Automation.CLI/CLITestBase.common.cs index 3754d3c1d5..e00555ca82 100644 --- a/test/E2ETests/Automation.CLI/CLITestBase.common.cs +++ b/test/E2ETests/Automation.CLI/CLITestBase.common.cs @@ -17,7 +17,7 @@ public partial class CLITestBase private const string PackagesFolder = "packages"; // This value is automatically updated by "build.ps1" script. - private const string TestPlatformCLIPackage = @"Microsoft.TestPlatform\17.0.0-preview-20210520-02"; + private const string TestPlatformCLIPackage = @"Microsoft.TestPlatform\17.0.0-preview-20210624-09"; private const string VstestConsoleRelativePath = @"tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"; ///