mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Add SQL Server Data Tools extensions to VS2019 (#559)
* add extensions * add exe installation * change Reporting Services name * add switch to function, add validation * change install wdk to function * Fix template * fix scripts name * add quotes * more quotes * one more quotes * get rid of duplicate code * move quotes to function * small improvment to wix installation * add comment to validate extensions script
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
###################################################################################
|
||||
## File: Install-AnalysisExtenstion.ps1
|
||||
## Desc: Install the Microsoft Analysis Services Projects Visual Studio extension
|
||||
###################################################################################
|
||||
|
||||
Import-Module -Name ImageHelpers -Force;
|
||||
|
||||
$extensionUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/2.9.5/vspackage"
|
||||
$extensionName = "Microsoft.DataTools.AnalysisServices.vsix"
|
||||
|
||||
Install-VsixExtension -Url $extensionUrl -Name $extensionName
|
||||
@@ -0,0 +1,11 @@
|
||||
###################################################################################
|
||||
## File: Install-SSDTExtensions.ps1
|
||||
## Desc: Install the extensions previously known as SSDT package
|
||||
###################################################################################
|
||||
|
||||
Import-Module -Name ImageHelpers -Force
|
||||
|
||||
Install-VsixExtension -Url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/2.9.5/vspackage' -Name 'Microsoft.DataTools.AnalysisServices.vsix' -VSversion "2019"
|
||||
Install-VsixExtension -Url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.4/vspackage' -Name 'Microsoft.DataTools.IntegrationServices.exe' -VSversion "2019"
|
||||
Install-VsixExtension -Url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/2.6.3/vspackage' -Name 'Microsoft.DataTools.ReportingServices.vsix' -VSversion "2019"
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-WDK.ps1
|
||||
## Desc: Install the Windows Driver Kit
|
||||
################################################################################
|
||||
|
||||
# Requires Windows SDK with the same version number as the WDK
|
||||
$winSdkUrl = "https://go.microsoft.com/fwlink/p/?linkid=2083338"
|
||||
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2085767"
|
||||
|
||||
# `winsdksetup.exe /features + /quiet` installs all features without showing the GUI
|
||||
$sdkExitCode = Install-EXE -Url $winSdkUrl -Name "winsdksetup.exe" -ArgumentList ("/features", "+", "/quiet")
|
||||
|
||||
if ($sdkExitCode -ne 0)
|
||||
{
|
||||
Write-Host "Failed to install the Windows SDK."
|
||||
exit $sdkExitCode
|
||||
}
|
||||
|
||||
# `wdksetup.exe /features + /quiet` installs all features without showing the GUI
|
||||
$wdkExitCode = Install-EXE -Url $wdkUrl -Name "wdksetup.exe" -ArgumentList ("/features", "+", "/quiet")
|
||||
|
||||
if ($wdkExitCode -ne 0)
|
||||
{
|
||||
Write-Host "Failed to install the Windows Driver Kit."
|
||||
exit $wdkExitCode
|
||||
}
|
||||
|
||||
# Need to install the VSIX to get the build targets when running VSBuild
|
||||
# Write-Host "Installing WDK.vsix"
|
||||
try
|
||||
{
|
||||
$process = Start-Process `
|
||||
-FilePath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" `
|
||||
-ArgumentList ("/quiet", '"C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix"') `
|
||||
-Wait `
|
||||
-PassThru
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host "There is an error during WDK.vsix installation"
|
||||
$_
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
$exitCode = $process.ExitCode
|
||||
|
||||
if ($exitCode -eq 0 -or $exitCode -eq 1001) # 1001 means the extension is already installed
|
||||
{
|
||||
Write-Host "WDK.vsix installed successfully"
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "Unsuccessful exit code returned by the installation process: $exitCode."
|
||||
}
|
||||
|
||||
exit $exitCode
|
||||
@@ -1,14 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Wix.ps1
|
||||
## Desc: Install WIX.
|
||||
################################################################################
|
||||
|
||||
Import-Module -Name ImageHelpers -Force;
|
||||
|
||||
choco install wixtoolset -y --force
|
||||
|
||||
$extensionUrl = "https://wixtoolset.gallerycdn.vsassets.io/extensions/wixtoolset/wixtoolsetvisualstudio2019extension/1.0.0.4/1563296438961/Votive2019.vsix"
|
||||
$extensionName = "Votive2019.vsix"
|
||||
|
||||
#Installing VS extension 'Wix Toolset Visual Studio 2019 Extension'
|
||||
Install-VsixExtension -Url $extensionUrl -Name $extensionName
|
||||
@@ -1,18 +0,0 @@
|
||||
################################################################################
|
||||
## 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
|
||||
@@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
## File: Validate-SSDTExtensions.ps1
|
||||
## Desc: Validate SQL Server Data Tools Visual Studio extensions
|
||||
################################################################################
|
||||
|
||||
Import-Module -Name ImageHelpers -Force
|
||||
|
||||
#These extensions don't have any proper name in the state.packages.json file, only id is available, which can be found on extension marketplace download page
|
||||
$AnalysisPackageVersion = Get-VSExtensionVersion -packageName "04a86fc2-dbd5-4222-848e-911638e487fe"
|
||||
$IntegrationPackageVersion = Get-VSExtensionVersion -packageName "851E7A09-7B2B-4F06-A15D-BABFCB26B970"
|
||||
$ReportingPackageVersion = Get-VSExtensionVersion -packageName "717ad572-c4b7-435c-c166-c2969777f718"
|
||||
|
||||
# Adding description of the software to Markdown
|
||||
$SoftwareName = "Microsoft SSDT Visual Studio 2019 Extensions"
|
||||
|
||||
$Description = @"
|
||||
_Microsoft Analysis Services Projects Version:_ $AnalysisPackageVersion<br/>
|
||||
_SQL Server Integration Services Projects Version:_ $IntegrationPackageVersion<br/>
|
||||
_Microsoft Reporting Services Projects Version:_ $ReportingPackageVersion<br/>
|
||||
"@
|
||||
|
||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
||||
@@ -1,32 +0,0 @@
|
||||
################################################################################
|
||||
## File: Validate-WDK.ps1
|
||||
## Desc: Validate the installation of the Windows Driver Kit
|
||||
################################################################################
|
||||
|
||||
Import-Module -Name ImageHelpers -Force
|
||||
|
||||
function Get-WDKVersion
|
||||
{
|
||||
$WDKVersion = (Get-WmiObject Win32_Product -Filter "Name = 'Windows Driver Kit'").version
|
||||
|
||||
if (!$WDKVersion)
|
||||
{
|
||||
Write-Host "WDK was not found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
return $WDKVersion
|
||||
}
|
||||
|
||||
$WDKVersion = Get-WDKVersion
|
||||
$WDKPackageVersion = Get-VS19ExtensionVersion -packageName "Microsoft.Windows.DriverKit"
|
||||
|
||||
# Adding description of the software to Markdown
|
||||
$SoftwareName = "Windows Driver Kit"
|
||||
|
||||
$Description = @"
|
||||
_WDK Version:_ $WDKVersion<br/>
|
||||
_WDK Visual Studio Extension Version:_ $WDKPackageVersion<br/>
|
||||
"@
|
||||
|
||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
||||
@@ -1,36 +0,0 @@
|
||||
################################################################################
|
||||
## File: Validate-Wix.ps1
|
||||
## Desc: Validate WIX.
|
||||
################################################################################
|
||||
|
||||
Import-Module -Name ImageHelpers -Force
|
||||
function Get-WixVersion {
|
||||
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
||||
$installedApplications = Get-ItemProperty -Path $regKey
|
||||
$Version = ($installedApplications | Where-Object { $_.DisplayName -and $_.DisplayName.toLower().Contains("wix") } | Select-Object -First 1).DisplayVersion
|
||||
return $Version
|
||||
}
|
||||
|
||||
$WixToolSetVersion = Get-WixVersion
|
||||
|
||||
if($WixToolSetVersion) {
|
||||
Write-Host "Wix Toolset version" $WixPackage.version "installed"
|
||||
}
|
||||
else {
|
||||
Write-Host "Wix Toolset is not installed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$WixPackageVersion = Get-VS19ExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev16"
|
||||
|
||||
# Adding description of the software to Markdown
|
||||
$SoftwareName = "WIX Tools"
|
||||
|
||||
$Description = @"
|
||||
_Toolset Version:_ $WixToolSetVersion<br/>
|
||||
_WIX Toolset Visual Studio Extension Version:_ $WixPackageVersion<br/>
|
||||
_Environment:_
|
||||
* WIX: Installation root of WIX
|
||||
"@
|
||||
|
||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
||||
Reference in New Issue
Block a user