mirror of
https://github.com/actions/runner-images.git
synced 2025-12-16 22:58:22 +00:00
Merge pull request #515 from miketimofeev/v-mitim/add_analysis_ext_to_vs19
Add Microsoft Analysis Services Projects extension for VS19
This commit is contained in:
@@ -172,6 +172,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Windows2019/Install-Wix.ps1"
|
"{{ template_dir }}/scripts/Installers/Windows2019/Install-Wix.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Windows2019/Install-AnalysisExtenstion.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"valid_exit_codes": [
|
"valid_exit_codes": [
|
||||||
@@ -204,6 +210,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Windows2019/Validate-Wix.ps1"
|
"{{ template_dir }}/scripts/Installers/Windows2019/Validate-Wix.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Windows2019/Validate-AnalysisExtenstion.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
###################################################################################
|
||||||
|
## File: Install-AnalysisExtenstion.ps1
|
||||||
|
## Desc: Install the Microsoft Analysis Services Projects Visual Studio extension
|
||||||
|
###################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
$extensionUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/2.9.5/vspackage"
|
||||||
|
$extensionDownloadPath = Join-Path $Env:TEMP "Microsoft.DataTools.AnalysisServices.vsix"
|
||||||
|
Write-Host "Downloading Microsoft.DataTools.AnalysisServices.vsix extension"
|
||||||
|
(New-Object System.Net.WebClient).DownloadFile($extensionUrl, $extensionDownloadPath)
|
||||||
|
|
||||||
|
Write-Host "Installing Microsoft.DataTools.AnalysisServices.vsix extension"
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$process = Start-Process `
|
||||||
|
-FilePath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" `
|
||||||
|
-ArgumentList ("/quiet", "$extensionDownloadPath") `
|
||||||
|
-Wait `
|
||||||
|
-PassThru
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Write-Host "There is an error during Microsoft.DataTools.AnalysisServices.vsix installation"
|
||||||
|
$_
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$exitCode = $process.ExitCode
|
||||||
|
|
||||||
|
if ($exitCode -eq 0 -or $exitCode -eq 1001) # 1001 means the extension is already installed
|
||||||
|
{
|
||||||
|
Write-Host "Microsoft.DataTools.AnalysisServices.vsix installed successfully"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Host "Unsuccessful exit code returned by the installation process: $exitCode."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#Cleanup installation files
|
||||||
|
Remove-Item -Force -Confirm:$false $extensionDownloadPath
|
||||||
|
|
||||||
|
exit $exitCode
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Validate-AnalysisExtenstion.ps1
|
||||||
|
## Desc: Validate Microsoft Analysis Services Projects Visual Studio extension
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
Import-Module -Name ImageHelpers -Force
|
||||||
|
|
||||||
|
#AnalysisPackage doesn't have any proper name in the state.packages.json file, only id is available
|
||||||
|
$AnalysisPackageVersion = Get-VS19ExtensionVersion -packageName "04a86fc2-dbd5-4222-848e-911638e487fe"
|
||||||
|
|
||||||
|
# Adding description of the software to Markdown
|
||||||
|
$SoftwareName = "Microsoft Analysis Services Projects Visual Studio Extension"
|
||||||
|
|
||||||
|
$Description = @"
|
||||||
|
_Version:_ $AnalysisPackageVersion<br/>
|
||||||
|
"@
|
||||||
|
|
||||||
|
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
||||||
Reference in New Issue
Block a user