Another mop up commit to add missing changes from the last mop-up.

This commit is contained in:
Shady Ibraheem
2019-12-13 09:48:00 -05:00
parent 95d3c31f21
commit 1dcd276b1e
188 changed files with 7333 additions and 7393 deletions

View File

@@ -1,146 +1,145 @@
################################################################################
## File: Initialize-VM.ps1
## Team: CI-Platform
## Desc: VM initialization script, machine level configuration
################################################################################
function Disable-InternetExplorerESC {
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 -Force
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 -Force
Stop-Process -Name Explorer -Force -ErrorAction Continue
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled."
}
function Disable-InternetExplorerWelcomeScreen {
$AdminKey = "HKLM:\Software\Policies\Microsoft\Internet Explorer\Main"
New-Item -Path $AdminKey -Value 1 -Force
Set-ItemProperty -Path $AdminKey -Name "DisableFirstRunCustomize" -Value 1 -Force
Write-Host "Disabled IE Welcome screen"
}
function Disable-UserAccessControl {
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 00000000 -Force
Write-Host "User Access Control (UAC) has been disabled."
}
Import-Module -Name ImageHelpers -Force
Write-Host "Setup PowerShellGet"
# Set-PSRepository -InstallationPolicy Trusted -Name PSGallery
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module -Name PowerShellGet -Force
Set-PSRepository -InstallationPolicy Trusted -Name PSGallery
Write-Host "Disable Antivirus"
Set-MpPreference -DisableRealtimeMonitoring $true
# Disable Windows Update
$AutoUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
If (Test-Path -Path $AutoUpdatePath) {
Set-ItemProperty -Path $AutoUpdatePath -Name NoAutoUpdate -Value 1
Write-Host "Disabled Windows Update"
}
else {
Write-Host "Windows Update key does not exist"
}
# Install .NET Framework 3.5 (required by Chocolatey)
Install-WindowsFeature -Name NET-Framework-Features -IncludeAllSubFeature
# Explicitly install all 4.7 sub features to include ASP.Net.
# As of 1/16/2019, WinServer 19 lists .Net 4.7 as NET-Framework-45-Features
Install-WindowsFeature -Name NET-Framework-45-Features -IncludeAllSubFeature
Write-Host "Disable UAC"
Disable-UserAccessControl
Write-Host "Disable IE Welcome Screen"
Disable-InternetExplorerWelcomeScreen
Write-Host "Disable IE ESC"
Disable-InternetExplorerESC
Write-Host "Setting local execution policy"
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -ErrorAction Continue | Out-Null
Get-ExecutionPolicy -List
Write-Host "Enable long path behavior"
# See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#maximum-path-length-limitation
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
Write-Host "Install chocolatey"
$chocoExePath = 'C:\ProgramData\Chocolatey\bin'
if ($($env:Path).ToLower().Contains($($chocoExePath).ToLower())) {
Write-Host "Chocolatey found in PATH, skipping install..."
Exit
}
# Add to system PATH
$systemPath = [Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine)
$systemPath += ';' + $chocoExePath
[Environment]::SetEnvironmentVariable("PATH", $systemPath, [System.EnvironmentVariableTarget]::Machine)
# Update local process' path
$userPath = [Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::User)
if ($userPath) {
$env:Path = $systemPath + ";" + $userPath
}
else {
$env:Path = $systemPath
}
# Run the installer
Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
# Turn off confirmation
choco feature enable -n allowGlobalConfirmation
# Install webpi
choco install webpicmd -y
# Expand disk size of OS drive
New-Item -Path d:\ -Name cmds.txt -ItemType File -Force
Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND"
$expandResult = (diskpart /s 'd:\cmds.txt')
Write-Host $expandResult
Write-Host "Disk sizes after expansion"
wmic logicaldisk get size,freespace,caption
# Adding description of the software to Markdown
$Content = @"
# Hosted Windows 2019
The following software is installed on machines in the **Hosted Windows 2019** (v$env:ImageVersion) pool.
Components marked with **\*** have been upgraded since the previous version of the image.
"@
Add-ContentToMarkdown -Content $Content
$SoftwareName = "Chocolatey"
if( $( $(choco version) | Out-String) -match 'Chocolatey v(?<version>.*).*' )
{
$chocoVersion = $Matches.version.Trim()
}
$Description = @"
_Version:_ $chocoVersion<br/>
_Environment:_
* PATH: contains location for choco.exe
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
################################################################################
## File: Initialize-VM.ps1
## Desc: VM initialization script, machine level configuration
################################################################################
function Disable-InternetExplorerESC {
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 -Force
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 -Force
Stop-Process -Name Explorer -Force -ErrorAction Continue
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled."
}
function Disable-InternetExplorerWelcomeScreen {
$AdminKey = "HKLM:\Software\Policies\Microsoft\Internet Explorer\Main"
New-Item -Path $AdminKey -Value 1 -Force
Set-ItemProperty -Path $AdminKey -Name "DisableFirstRunCustomize" -Value 1 -Force
Write-Host "Disabled IE Welcome screen"
}
function Disable-UserAccessControl {
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 00000000 -Force
Write-Host "User Access Control (UAC) has been disabled."
}
Import-Module -Name ImageHelpers -Force
Write-Host "Setup PowerShellGet"
# Set-PSRepository -InstallationPolicy Trusted -Name PSGallery
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module -Name PowerShellGet -Force
Set-PSRepository -InstallationPolicy Trusted -Name PSGallery
Write-Host "Disable Antivirus"
Set-MpPreference -DisableRealtimeMonitoring $true
# Disable Windows Update
$AutoUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
If (Test-Path -Path $AutoUpdatePath) {
Set-ItemProperty -Path $AutoUpdatePath -Name NoAutoUpdate -Value 1
Write-Host "Disabled Windows Update"
}
else {
Write-Host "Windows Update key does not exist"
}
# Install .NET Framework 3.5 (required by Chocolatey)
Install-WindowsFeature -Name NET-Framework-Features -IncludeAllSubFeature
# Explicitly install all 4.7 sub features to include ASP.Net.
# As of 1/16/2019, WinServer 19 lists .Net 4.7 as NET-Framework-45-Features
Install-WindowsFeature -Name NET-Framework-45-Features -IncludeAllSubFeature
Write-Host "Disable UAC"
Disable-UserAccessControl
Write-Host "Disable IE Welcome Screen"
Disable-InternetExplorerWelcomeScreen
Write-Host "Disable IE ESC"
Disable-InternetExplorerESC
Write-Host "Setting local execution policy"
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -ErrorAction Continue | Out-Null
Get-ExecutionPolicy -List
Write-Host "Enable long path behavior"
# See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#maximum-path-length-limitation
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
Write-Host "Install chocolatey"
$chocoExePath = 'C:\ProgramData\Chocolatey\bin'
if ($($env:Path).ToLower().Contains($($chocoExePath).ToLower())) {
Write-Host "Chocolatey found in PATH, skipping install..."
Exit
}
# Add to system PATH
$systemPath = [Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine)
$systemPath += ';' + $chocoExePath
[Environment]::SetEnvironmentVariable("PATH", $systemPath, [System.EnvironmentVariableTarget]::Machine)
# Update local process' path
$userPath = [Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::User)
if ($userPath) {
$env:Path = $systemPath + ";" + $userPath
}
else {
$env:Path = $systemPath
}
# Run the installer
Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
# Turn off confirmation
choco feature enable -n allowGlobalConfirmation
# Install webpi
choco install webpicmd -y
# Expand disk size of OS drive
New-Item -Path d:\ -Name cmds.txt -ItemType File -Force
Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND"
$expandResult = (diskpart /s 'd:\cmds.txt')
Write-Host $expandResult
Write-Host "Disk sizes after expansion"
wmic logicaldisk get size,freespace,caption
# Adding description of the software to Markdown
$Content = @"
# Azure Pipelines Hosted Windows 2019 with VS2019 image
The following software is installed on machines in the Azure Pipelines **Hosted Windows 2019 with VS2019** (v$env:ImageVersion) pool.
Components marked with **\*** have been upgraded since the previous version of the image.
"@
Add-ContentToMarkdown -Content $Content
$SoftwareName = "Chocolatey"
if( $( $(choco version) | Out-String) -match 'Chocolatey v(?<version>.*).*' )
{
$chocoVersion = $Matches.version.Trim()
}
$Description = @"
_Version:_ $chocoVersion<br/>
_Environment:_
* PATH: contains location for choco.exe
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description

View File

@@ -1,29 +1,28 @@
################################################################################
## File: Install-Python.ps1
## Team: CI-X
## Desc: Configure python on path with 3.7.* version from the tools cache
## Must run after tools cache is setup
################################################################################
Import-Module -Name ImageHelpers -Force
$python37path = $Env:AGENT_TOOLSDIRECTORY + '/Python/3.7*/x64'
$pythonDir = Get-Item -Path $python37path
if($pythonDir -is [array])
{
Write-Host "More than one python 3.7.* installations found"
Write-Host $pythonDir
exit 1
}
$currentPath = Get-MachinePath
if ($currentPath | Select-String -SimpleMatch $pythonDir.FullName)
{
Write-Host $pythonDir.FullName ' is already in PATH'
exit 0
}
Add-MachinePathItem -PathItem $pythonDir.FullName
Add-MachinePathItem -PathItem "$($pythonDir.FullName)\Scripts"
################################################################################
## File: Install-Python.ps1
## Desc: Configure python on path with 3.7.* version from the tools cache
## Must run after tools cache is setup
################################################################################
Import-Module -Name ImageHelpers -Force
$python37path = $Env:AGENT_TOOLSDIRECTORY + '/Python/3.7*/x64'
$pythonDir = Get-Item -Path $python37path
if($pythonDir -is [array])
{
Write-Host "More than one python 3.7.* installations found"
Write-Host $pythonDir
exit 1
}
$currentPath = Get-MachinePath
if ($currentPath | Select-String -SimpleMatch $pythonDir.FullName)
{
Write-Host $pythonDir.FullName ' is already in PATH'
exit 0
}
Add-MachinePathItem -PathItem $pythonDir.FullName
Add-MachinePathItem -PathItem "$($pythonDir.FullName)\Scripts"

View File

@@ -1,191 +1,189 @@
################################################################################
## File: Install-VS2019.ps1
## Team: CI-Build
## Desc: Install Visual Studio 2019
################################################################################
$ErrorActionPreference = "Stop"
Function InstallVS
{
Param
(
[String]$WorkLoads,
[String]$Sku,
[String] $VSBootstrapperURL
)
$exitCode = -1
try
{
Write-Host "Enable short name support on Windows needed for Xamarin Android AOT, defaults appear to have been changed in Azure VMs"
$shortNameEnableProcess = Start-Process -FilePath fsutil.exe -ArgumentList ('8dot3name', 'set', '0') -Wait -PassThru
$shortNameEnableExitCode = $shortNameEnableProcess.ExitCode
if ($shortNameEnableExitCode -ne 0)
{
Write-Host -Object 'Enabling short name support on Windows failed. This needs to be enabled prior to VS 2017 install for Xamarin Andriod AOT to work.'
exit $shortNameEnableExitCode
}
Write-Host "Downloading Bootstrapper ..."
Invoke-WebRequest -Uri $VSBootstrapperURL -OutFile "${env:Temp}\vs_$Sku.exe"
$FilePath = "${env:Temp}\vs_$Sku.exe"
$Arguments = ('/c', $FilePath, $WorkLoads, '--quiet', '--norestart', '--wait', '--nocache' )
Write-Host "Starting Install ..."
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru
$exitCode = $process.ExitCode
if ($exitCode -eq 0 -or $exitCode -eq 3010)
{
Write-Host -Object 'Installation successful'
return $exitCode
}
else
{
Write-Host -Object "Non zero exit code returned by the installation process : $exitCode."
# this wont work because of log size limitation in extension manager
# Get-Content $customLogFilePath | Write-Host
exit $exitCode
}
}
catch
{
Write-Host -Object "Failed to install Visual Studio. Check the logs for details in $customLogFilePath"
Write-Host -Object $_.Exception.Message
exit -1
}
}
$WorkLoads = '--allWorkloads --includeRecommended ' + `
'--add Component.Dotfuscator ' + `
'--add Component.Linux.CMake ' + `
'--add Component.UnityEngine.x64 ' + `
'--add Component.UnityEngine.x86 ' + `
'--add Component.Unreal.Android ' + `
'--add Microsoft.Component.Azure.DataLake.Tools ' + `
'--add Microsoft.Component.CookiecutterTools ' + `
'--add Microsoft.Component.PythonTools.Miniconda ' + `
'--add Microsoft.Component.PythonTools.Web ' + `
'--add Microsoft.Component.VC.Runtime.UCRTSDK ' + `
'--add Microsoft.Net.ComponentGroup.4.6.2.DeveloperTools ' + `
'--add Microsoft.Net.ComponentGroup.4.7.1.DeveloperTools ' + `
'--add Microsoft.Net.ComponentGroup.4.7.DeveloperTools ' + `
'--add Microsoft.VisualStudio.Component.AspNet45 ' + `
'--add Microsoft.VisualStudio.Component.Azure.Kubernetes.Tools ' + `
'--add Microsoft.VisualStudio.Component.Azure.MobileAppsSdk ' + `
'--add Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools ' + `
'--add Microsoft.VisualStudio.Component.Azure.Storage.AzCopy ' + `
'--add Microsoft.VisualStudio.Component.Debugger.JustInTime ' + `
'--add Microsoft.VisualStudio.Component.DslTools ' + `
'--add Microsoft.VisualStudio.Component.EntityFramework ' + `
'--add Microsoft.VisualStudio.Component.FSharp.Desktop ' + `
'--add Microsoft.VisualStudio.Component.LinqToSql ' + `
'--add Microsoft.VisualStudio.Component.PortableLibrary ' + `
'--add Microsoft.VisualStudio.Component.TeamOffice ' + `
'--add Microsoft.VisualStudio.Component.TestTools.CodedUITest ' + `
'--add Microsoft.VisualStudio.Component.TestTools.WebLoadTest ' + `
'--add Microsoft.VisualStudio.Component.UWP.VC.ARM64 ' + `
'--add Microsoft.VisualStudio.Component.VC.140 ' + `
'--add Microsoft.VisualStudio.Component.VC.ATL.ARM ' + `
'--add Microsoft.VisualStudio.Component.VC.ATLMFC ' + `
'--add Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.CLI.Support ' + `
'--add Microsoft.VisualStudio.Component.VC.CMake.Project ' + `
'--add Microsoft.VisualStudio.Component.VC.DiagnosticTools ' + `
'--add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset ' + `
'--add Microsoft.VisualStudio.Component.VC.MFC.ARM ' + `
'--add Microsoft.VisualStudio.Component.VC.MFC.ARM.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.MFC.ARM64 ' + `
'--add Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.Redist.MSM ' + `
'--add Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest ' + `
'--add Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest ' + `
'--add Microsoft.VisualStudio.Component.VC.v141 ' + `
'--add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.16299 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.17134 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.17763 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.18362 ' + `
'--add Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices ' + `
'--add Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools ' + `
'--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang ' + `
'--add Microsoft.VisualStudio.ComponentGroup.Web.CloudTools ' + `
'--add Microsoft.VisualStudio.Workload.Azure ' + `
'--add Microsoft.VisualStudio.Workload.Data ' + `
'--add Microsoft.VisualStudio.Workload.DataScience ' + `
'--add Microsoft.VisualStudio.Workload.ManagedDesktop ' + `
'--add Microsoft.VisualStudio.Workload.ManagedGame ' + `
'--add Microsoft.VisualStudio.Workload.NativeCrossPlat ' + `
'--add Microsoft.VisualStudio.Workload.NativeDesktop ' + `
'--add Microsoft.VisualStudio.Workload.NativeGame ' + `
'--add Microsoft.VisualStudio.Workload.NativeMobile ' + `
'--add Microsoft.VisualStudio.Workload.NetCoreTools ' + `
'--add Microsoft.VisualStudio.Workload.NetCrossPlat ' + `
'--add Microsoft.VisualStudio.Workload.NetWeb ' + `
'--add Microsoft.VisualStudio.Workload.Node ' + `
'--add Microsoft.VisualStudio.Workload.Office ' + `
'--add Microsoft.VisualStudio.Workload.Python ' + `
'--remove Component.CPython3.x64 ' + `
'--add Microsoft.VisualStudio.Workload.Universal ' + `
'--add Microsoft.VisualStudio.Workload.VisualStudioExtension'
$ReleaseInPath = 'Enterprise'
$Sku = 'Enterprise'
$VSBootstrapperURL = 'https://aka.ms/vs/16/release/vs_Enterprise.exe'
$ErrorActionPreference = 'Stop'
# Install VS
$exitCode = InstallVS -WorkLoads $WorkLoads -Sku $Sku -VSBootstrapperURL $VSBootstrapperURL
# Find the version of VS installed for this instance
# Only supports a single instance
$vsProgramData = Get-Item -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
$instanceFolders = Get-ChildItem -Path $vsProgramData.FullName
if($instanceFolders -is [array])
{
Write-Host "More than one instance installed"
exit 1
}
$catalogContent = Get-Content -Path ($instanceFolders.FullName + '\catalog.json')
$catalog = $catalogContent | ConvertFrom-Json
$version = $catalog.info.id
Write-Host "Visual Studio version" $version "installed"
# Initialize Visual Studio Experimental Instance
&"C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit
# Updating content of MachineState.json file to disable autoupdate of VSIX extensions
$newContent = '{"Extensions":[{"Key":"1e906ff5-9da8-4091-a299-5c253c55fdc9","Value":{"ShouldAutoUpdate":false}},{"Key":"Microsoft.VisualStudio.Web.AzureFunctions","Value":{"ShouldAutoUpdate":false}}],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}'
Set-Content -Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath\Common7\IDE\Extensions\MachineState.json" -Value $newContent
# Adding description of the software to Markdown
$SoftwareName = "Visual Studio 2019 Enterprise"
$Description = @"
_Version:_ $version<br/>
_Location:_ C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath
The following workloads and components are installed with Visual Studio 2019:
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
# Adding explicitly added Workloads details to markdown by parsing $Workloads
Add-ContentToMarkdown -Content $($WorkLoads.Split('--') | % { if( ($_.Split(" "))[0] -like "add") { "* " +($_.Split(" "))[1] } } )
exit $exitCode
################################################################################
## File: Install-VS2019.ps1
## Desc: Install Visual Studio 2019
################################################################################
$ErrorActionPreference = "Stop"
Function InstallVS
{
Param
(
[String]$WorkLoads,
[String]$Sku,
[String] $VSBootstrapperURL
)
$exitCode = -1
try
{
Write-Host "Enable short name support on Windows needed for Xamarin Android AOT, defaults appear to have been changed in Azure VMs"
$shortNameEnableProcess = Start-Process -FilePath fsutil.exe -ArgumentList ('8dot3name', 'set', '0') -Wait -PassThru
$shortNameEnableExitCode = $shortNameEnableProcess.ExitCode
if ($shortNameEnableExitCode -ne 0)
{
Write-Host -Object 'Enabling short name support on Windows failed. This needs to be enabled prior to VS 2017 install for Xamarin Andriod AOT to work.'
exit $shortNameEnableExitCode
}
Write-Host "Downloading Bootstrapper ..."
Invoke-WebRequest -Uri $VSBootstrapperURL -OutFile "${env:Temp}\vs_$Sku.exe"
$FilePath = "${env:Temp}\vs_$Sku.exe"
$Arguments = ('/c', $FilePath, $WorkLoads, '--quiet', '--norestart', '--wait', '--nocache' )
Write-Host "Starting Install ..."
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru
$exitCode = $process.ExitCode
if ($exitCode -eq 0 -or $exitCode -eq 3010)
{
Write-Host -Object 'Installation successful'
return $exitCode
}
else
{
Write-Host -Object "Non zero exit code returned by the installation process : $exitCode."
# this wont work because of log size limitation in extension manager
# Get-Content $customLogFilePath | Write-Host
exit $exitCode
}
}
catch
{
Write-Host -Object "Failed to install Visual Studio. Check the logs for details in $customLogFilePath"
Write-Host -Object $_.Exception.Message
exit -1
}
}
$WorkLoads = '--allWorkloads --includeRecommended ' + `
'--add Component.Dotfuscator ' + `
'--add Component.Linux.CMake ' + `
'--add Component.UnityEngine.x64 ' + `
'--add Component.UnityEngine.x86 ' + `
'--add Component.Unreal.Android ' + `
'--add Microsoft.Component.Azure.DataLake.Tools ' + `
'--add Microsoft.Component.CookiecutterTools ' + `
'--add Microsoft.Component.PythonTools.Miniconda ' + `
'--add Microsoft.Component.PythonTools.Web ' + `
'--add Microsoft.Component.VC.Runtime.UCRTSDK ' + `
'--add Microsoft.Net.ComponentGroup.4.6.2.DeveloperTools ' + `
'--add Microsoft.Net.ComponentGroup.4.7.1.DeveloperTools ' + `
'--add Microsoft.Net.ComponentGroup.4.7.DeveloperTools ' + `
'--add Microsoft.VisualStudio.Component.AspNet45 ' + `
'--add Microsoft.VisualStudio.Component.Azure.Kubernetes.Tools ' + `
'--add Microsoft.VisualStudio.Component.Azure.MobileAppsSdk ' + `
'--add Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools ' + `
'--add Microsoft.VisualStudio.Component.Azure.Storage.AzCopy ' + `
'--add Microsoft.VisualStudio.Component.Debugger.JustInTime ' + `
'--add Microsoft.VisualStudio.Component.DslTools ' + `
'--add Microsoft.VisualStudio.Component.EntityFramework ' + `
'--add Microsoft.VisualStudio.Component.FSharp.Desktop ' + `
'--add Microsoft.VisualStudio.Component.LinqToSql ' + `
'--add Microsoft.VisualStudio.Component.PortableLibrary ' + `
'--add Microsoft.VisualStudio.Component.TeamOffice ' + `
'--add Microsoft.VisualStudio.Component.TestTools.CodedUITest ' + `
'--add Microsoft.VisualStudio.Component.TestTools.WebLoadTest ' + `
'--add Microsoft.VisualStudio.Component.UWP.VC.ARM64 ' + `
'--add Microsoft.VisualStudio.Component.VC.140 ' + `
'--add Microsoft.VisualStudio.Component.VC.ATL.ARM ' + `
'--add Microsoft.VisualStudio.Component.VC.ATLMFC ' + `
'--add Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.CLI.Support ' + `
'--add Microsoft.VisualStudio.Component.VC.CMake.Project ' + `
'--add Microsoft.VisualStudio.Component.VC.DiagnosticTools ' + `
'--add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset ' + `
'--add Microsoft.VisualStudio.Component.VC.MFC.ARM ' + `
'--add Microsoft.VisualStudio.Component.VC.MFC.ARM.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.MFC.ARM64 ' + `
'--add Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre ' + `
'--add Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest ' + `
'--add Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest ' + `
'--add Microsoft.VisualStudio.Component.VC.v141 ' + `
'--add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.16299 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.17134 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.17763 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.18362 ' + `
'--add Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices ' + `
'--add Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools ' + `
'--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang ' + `
'--add Microsoft.VisualStudio.ComponentGroup.Web.CloudTools ' + `
'--add Microsoft.VisualStudio.Workload.Azure ' + `
'--add Microsoft.VisualStudio.Workload.Data ' + `
'--add Microsoft.VisualStudio.Workload.DataScience ' + `
'--add Microsoft.VisualStudio.Workload.ManagedDesktop ' + `
'--add Microsoft.VisualStudio.Workload.ManagedGame ' + `
'--add Microsoft.VisualStudio.Workload.NativeCrossPlat ' + `
'--add Microsoft.VisualStudio.Workload.NativeDesktop ' + `
'--add Microsoft.VisualStudio.Workload.NativeGame ' + `
'--add Microsoft.VisualStudio.Workload.NativeMobile ' + `
'--add Microsoft.VisualStudio.Workload.NetCoreTools ' + `
'--add Microsoft.VisualStudio.Workload.NetCrossPlat ' + `
'--add Microsoft.VisualStudio.Workload.NetWeb ' + `
'--add Microsoft.VisualStudio.Workload.Node ' + `
'--add Microsoft.VisualStudio.Workload.Office ' + `
'--add Microsoft.VisualStudio.Workload.Python ' + `
'--remove Component.CPython3.x64 ' + `
'--add Microsoft.VisualStudio.Workload.Universal ' + `
'--add Microsoft.VisualStudio.Workload.VisualStudioExtension'
$ReleaseInPath = 'Enterprise'
$Sku = 'Enterprise'
$VSBootstrapperURL = 'https://aka.ms/vs/16/release/vs_Enterprise.exe'
$ErrorActionPreference = 'Stop'
# Install VS
$exitCode = InstallVS -WorkLoads $WorkLoads -Sku $Sku -VSBootstrapperURL $VSBootstrapperURL
# Find the version of VS installed for this instance
# Only supports a single instance
$vsProgramData = Get-Item -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
$instanceFolders = Get-ChildItem -Path $vsProgramData.FullName
if($instanceFolders -is [array])
{
Write-Host "More than one instance installed"
exit 1
}
$catalogContent = Get-Content -Path ($instanceFolders.FullName + '\catalog.json')
$catalog = $catalogContent | ConvertFrom-Json
$version = $catalog.info.id
Write-Host "Visual Studio version" $version "installed"
# Initialize Visual Studio Experimental Instance
&"C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit
# Updating content of MachineState.json file to disable autoupdate of VSIX extensions
$newContent = '{"Extensions":[{"Key":"1e906ff5-9da8-4091-a299-5c253c55fdc9","Value":{"ShouldAutoUpdate":false}},{"Key":"Microsoft.VisualStudio.Web.AzureFunctions","Value":{"ShouldAutoUpdate":false}}],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}'
Set-Content -Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath\Common7\IDE\Extensions\MachineState.json" -Value $newContent
# Adding description of the software to Markdown
$SoftwareName = "Visual Studio 2019 Enterprise"
$Description = @"
_Version:_ $version<br/>
_Location:_ C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath
The following workloads and components are installed with Visual Studio 2019:
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
# Adding explicitly added Workloads details to markdown by parsing $Workloads
Add-ContentToMarkdown -Content $($WorkLoads.Split('--') | % { if( ($_.Split(" "))[0] -like "add") { "* " +($_.Split(" "))[1] } } )
exit $exitCode

View File

@@ -1,54 +1,53 @@
################################################################################
## File: Install-WDK.ps1
## Team: CI-X
## Desc: Install the Windows Driver Kit
################################################################################
# Version: 10.0.17763.0
# Update Validate-WDK.ps1 if the version changes!
# There doesn't seem to be any way to check the version programmatically
# Requires Windows SDK with the same version number as the WDK
$winSdkUrl = "https://go.microsoft.com/fwlink/p/?LinkID=2023014"
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2026156"
# `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"
<# ISSUE - VSIX installer failing on VS2019
$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\WDK.vsix"') `
-Wait `
-PassThru
$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
#>
################################################################################
## File: Install-WDK.ps1
## Desc: Install the Windows Driver Kit
################################################################################
# Version: 10.0.17763.0
# Update Validate-WDK.ps1 if the version changes!
# There doesn't seem to be any way to check the version programmatically
# Requires Windows SDK with the same version number as the WDK
$winSdkUrl = "https://go.microsoft.com/fwlink/p/?LinkID=2023014"
$wdkUrl = "https://go.microsoft.com/fwlink/?linkid=2026156"
# `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"
<# ISSUE - VSIX installer failing on VS2019
$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\WDK.vsix"') `
-Wait `
-PassThru
$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
#>

View File

@@ -1,54 +1,53 @@
################################################################################
## File: Install-Wix.ps1
## Team: CI-Build
## Desc: Install WIX.
################################################################################
function Install-VsixExtension
{
Param
(
[String]$Url,
[String]$Name
)
$ReleaseInPath = 'Enterprise'
$exitCode = -1
try
{
Write-Host "Downloading $Name..."
$FilePath = "${env:Temp}\$Name"
Invoke-WebRequest -Uri $Url -OutFile $FilePath
$ArgumentList = ('/quiet', $FilePath)
Write-Host "Starting Install $Name..."
$process = Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath\Common7\IDE\VSIXInstaller.exe" -ArgumentList $ArgumentList -Wait -PassThru
$exitCode = $process.ExitCode
if ($exitCode -eq 0 -or $exitCode -eq 3010)
{
Write-Host -Object 'Installation successful'
return $exitCode
}
else
{
Write-Host -Object "Non zero exit code returned by the installation process : $exitCode."
return $exitCode
}
}
catch
{
Write-Host -Object "Failed to install the Extension $Name"
Write-Host -Object $_.Exception.Message
return -1
}
}
choco install wixtoolset -y --force
#Installing VS extension 'Wix Toolset Visual Studio 2019 Extension'
$exitCode = Install-VsixExtension -Url 'https://wixtoolset.gallerycdn.vsassets.io/extensions/wixtoolset/wixtoolsetvisualstudio2019extension/1.0.0.4/1563296438961/Votive2019.vsix' -Name 'Votive2019.vsix'
#return $exitCode
################################################################################
## File: Install-Wix.ps1
## Desc: Install WIX.
################################################################################
function Install-VsixExtension
{
Param
(
[String]$Url,
[String]$Name
)
$ReleaseInPath = 'Enterprise'
$exitCode = -1
try
{
Write-Host "Downloading $Name..."
$FilePath = "${env:Temp}\$Name"
Invoke-WebRequest -Uri $Url -OutFile $FilePath
$ArgumentList = ('/quiet', $FilePath)
Write-Host "Starting Install $Name..."
$process = Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath\Common7\IDE\VSIXInstaller.exe" -ArgumentList $ArgumentList -Wait -PassThru
$exitCode = $process.ExitCode
if ($exitCode -eq 0 -or $exitCode -eq 3010)
{
Write-Host -Object 'Installation successful'
return $exitCode
}
else
{
Write-Host -Object "Non zero exit code returned by the installation process : $exitCode."
return $exitCode
}
}
catch
{
Write-Host -Object "Failed to install the Extension $Name"
Write-Host -Object $_.Exception.Message
return -1
}
}
choco install wixtoolset -y --force
#Installing VS extension 'Wix Toolset Visual Studio 2019 Extension'
$exitCode = Install-VsixExtension -Url 'https://wixtoolset.gallerycdn.vsassets.io/extensions/wixtoolset/wixtoolsetvisualstudio2019extension/1.0.0.4/1563296438961/Votive2019.vsix' -Name 'Votive2019.vsix'
#return $exitCode

View File

@@ -1,28 +1,27 @@
################################################################################
## File: Run-Antivirus.ps1
## Team: CI-Platform
## Desc: Run a full antivirus scan.
## Run right after cleanup before we sysprep
################################################################################
Write-Host "Make sure windefend is going to start"
Start-Service windefend -ErrorAction Continue
Write-Host "Waiting for windefend to report as running"
$service = Get-Service "Windefend"
$service.WaitForStatus("Running","00:10:00")
Write-Host "Run antivirus"
Push-Location "C:\Program Files\Windows Defender"
# Tell Defender to use 100% of the CPU during the scan
Set-MpPreference -ScanAvgCPULoadFactor 100
# Full Scan
.\MpCmdRun.exe -Scan -ScanType 2
Pop-Location
Update-MpSignature
Write-Host "Set antivirus parmeters"
Set-MpPreference -ScanAvgCPULoadFactor 5 `
-ExclusionPath "D:\", "C:\"
################################################################################
## File: Run-Antivirus.ps1
## Desc: Run a full antivirus scan.
## Run right after cleanup before we sysprep
################################################################################
Write-Host "Make sure windefend is going to start"
Start-Service windefend -ErrorAction Continue
Write-Host "Waiting for windefend to report as running"
$service = Get-Service "Windefend"
$service.WaitForStatus("Running","00:10:00")
Write-Host "Run antivirus"
Push-Location "C:\Program Files\Windows Defender"
# Tell Defender to use 100% of the CPU during the scan
Set-MpPreference -ScanAvgCPULoadFactor 100
# Full Scan
.\MpCmdRun.exe -Scan -ScanType 2
Pop-Location
Update-MpSignature
Write-Host "Set antivirus parmeters"
Set-MpPreference -ScanAvgCPULoadFactor 5 `
-ExclusionPath "D:\", "C:\"

View File

@@ -1,37 +1,36 @@
################################################################################
## File: Update-DockerImages.ps1
## Team: ReleaseManagement
## Desc: Pull some standard docker images.
## Must be run after docker is installed.
################################################################################
function DockerPull {
Param ([string]$image)
Write-Host Installing $image ...
docker pull $image
if (!$?) {
echo "Docker pull failed with a non-zero exit code"
exit 1
}
}
DockerPull mcr.microsoft.com/windows/servercore:ltsc2019
DockerPull mcr.microsoft.com/windows/nanoserver:1809
DockerPull microsoft/aspnetcore-build:1.0-2.0
DockerPull mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
DockerPull mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019
# Adding description of the software to Markdown
$SoftwareName = "Docker images"
$Description = @"
The following container images have been cached:
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
Add-ContentToMarkdown -Content $(docker images --digests --format "* {{.Repository}}:{{.Tag}} (Digest: {{.Digest}})")
################################################################################
## File: Update-DockerImages.ps1
## Desc: Pull some standard docker images.
## Must be run after docker is installed.
################################################################################
function DockerPull {
Param ([string]$image)
Write-Host Installing $image ...
docker pull $image
if (!$?) {
echo "Docker pull failed with a non-zero exit code"
exit 1
}
}
DockerPull mcr.microsoft.com/windows/servercore:ltsc2019
DockerPull mcr.microsoft.com/windows/nanoserver:1809
DockerPull microsoft/aspnetcore-build:1.0-2.0
DockerPull mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
DockerPull mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019
# Adding description of the software to Markdown
$SoftwareName = "Docker images"
$Description = @"
The following container images have been cached:
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
Add-ContentToMarkdown -Content $(docker images --digests --format "* {{.Repository}}:{{.Tag}} (Digest: {{.Digest}})")

View File

@@ -1,14 +1,13 @@
################################################################################
## File: Validate-WDK.ps1
## Team: CI-X
## Desc: Validate the installation of the Windows Driver Kit
################################################################################
# Adding description of the software to Markdown
$SoftwareName = "Windows Driver Kit"
$Description = @"
_Version:_ 10.0.17763.0<br/>
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
################################################################################
## File: Validate-WDK.ps1
## Desc: Validate the installation of the Windows Driver Kit
################################################################################
# Adding description of the software to Markdown
$SoftwareName = "Windows Driver Kit"
$Description = @"
_Version:_ 10.0.17763.0<br/>
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description

View File

@@ -1,62 +1,61 @@
################################################################################
## File: Validate-Wix.ps1
## Team: CI-Build
## 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
}
#Gets the extension details from state.json
function Get-WixExtensionPackage {
$vsProgramData = Get-Item -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
$instanceFolders = Get-ChildItem -Path $vsProgramData.FullName
if($instanceFolders -is [array])
{
Write-Host "More than one instance installed"
exit 1
}
$stateContent = Get-Content -Path ($instanceFolders.FullName + '\state.packages.json')
$state = $stateContent | ConvertFrom-Json
$WixPackage = $state.packages | where { $_.id -eq "WixToolset.VisualStudioExtension.Dev16" }
return $WixPackage
}
$WixToolSetVersion = Get-WixVersion
if($WixToolSetVersion) {
Write-Host "Wix Toolset version" $WixPackage.version "installed"
}
else {
Write-Host "Wix Toolset is not installed"
exit 1
}
$WixPackage = Get-WixExtensionPackage
if($WixPackage) {
Write-Host "Wix Extension version" $WixPackage.version "installed"
}
else {
Write-Host "Wix Extension is not installed"
exit 1
}
# Adding description of the software to Markdown
$SoftwareName = "WIX Tools"
$Description = @"
_Toolset Version:_ $WixToolSetVersion<br/>
_WIX Toolset Visual Studio Extension Version:_ $($WixPackage.version)<br/>
_Environment:_
* WIX: Installation root of WIX
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
################################################################################
## 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
}
#Gets the extension details from state.json
function Get-WixExtensionPackage {
$vsProgramData = Get-Item -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
$instanceFolders = Get-ChildItem -Path $vsProgramData.FullName
if($instanceFolders -is [array])
{
Write-Host "More than one instance installed"
exit 1
}
$stateContent = Get-Content -Path ($instanceFolders.FullName + '\state.packages.json')
$state = $stateContent | ConvertFrom-Json
$WixPackage = $state.packages | where { $_.id -eq "WixToolset.VisualStudioExtension.Dev16" }
return $WixPackage
}
$WixToolSetVersion = Get-WixVersion
if($WixToolSetVersion) {
Write-Host "Wix Toolset version" $WixPackage.version "installed"
}
else {
Write-Host "Wix Toolset is not installed"
exit 1
}
$WixPackage = Get-WixExtensionPackage
if($WixPackage) {
Write-Host "Wix Extension version" $WixPackage.version "installed"
}
else {
Write-Host "Wix Extension is not installed"
exit 1
}
# Adding description of the software to Markdown
$SoftwareName = "WIX Tools"
$Description = @"
_Toolset Version:_ $WixToolSetVersion<br/>
_WIX Toolset Visual Studio Extension Version:_ $($WixPackage.version)<br/>
_Environment:_
* WIX: Installation root of WIX
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description