From 493f3c3ee19fc6f2f5456b1f8563f77f0096c3e1 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Fri, 29 Jul 2022 22:13:23 +0400 Subject: [PATCH] [windows] Add exe installation of MicrosoftAnalysisServices Visual Studio extension (#5989) * Add exe installation of MicrosoftAnalysisServices * Change condition to check FileName.EndsWith --- images/win/scripts/ImageHelpers/InstallHelpers.ps1 | 5 +++++ images/win/scripts/Installers/Install-Vsix.ps1 | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 7ceb718a..e898be5c 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -249,6 +249,11 @@ function Get-VsixExtenstionFromMarketplace { $fileName = "Microsoft.DataTools.AnalysisServices.vsix" $downloadUri = "https://download.microsoft.com/download/c/8/9/c896a7f2-d0fd-45ac-90e6-ff61f67523cb/Microsoft.DataTools.AnalysisServices.vsix" } + # Starting from version 4.1 SqlServerIntegrationServicesProjects extension is distributed as exe file + "SSIS.SqlServerIntegrationServicesProjects" { + $fileName = "Microsoft.DataTools.IntegrationServices.exe" + $downloadUri = $assetUri + "/" + $fileName + } } return [PSCustomObject] @{ diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 405a4562..439fb291 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -14,7 +14,12 @@ $vsVersion = $toolset.visualStudio.Version $vsixPackagesList | ForEach-Object { # Retrieve cdn endpoint to avoid HTTP error 429 https://github.com/actions/virtual-environments/issues/3074 $vsixPackage = Get-VsixExtenstionFromMarketplace -ExtensionMarketPlaceName $_ - Install-VsixExtension -Url $vsixPackage.DownloadUri -Name $vsixPackage.FileName -VSversion $vsVersion + if ($vsixPackage.FileName.EndsWith(".vsix")) { + Install-VsixExtension -Url $vsixPackage.DownloadUri -Name $vsixPackage.FileName -VSversion $vsVersion + } else { + $argumentList = ('/install', '/quiet', '/norestart') + Install-Binary -Url $vsixPackage.DownloadUri -Name $vsixPackage.FileName -ArgumentList $argumentList + } } Invoke-PesterTests -TestFile "Vsix" \ No newline at end of file