mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
add VS build tools installation, tests, reports, made minor changes to current VS install helper functions
This commit is contained in:
@@ -266,14 +266,8 @@ function Get-VSExtensionVersion
|
||||
[string] $packageName
|
||||
)
|
||||
|
||||
$instanceFolders = Get-ChildItem -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
|
||||
if ($instanceFolders -is [array])
|
||||
{
|
||||
Write-Host "More than one instance installed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$stateContent = Get-Content -Path (Join-Path $instanceFolders.FullName '\state.packages.json')
|
||||
$instanceFolders = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioInstallation -VSInstallType "VS").InstanceId
|
||||
$stateContent = Get-Content -Path (Join-Path $instanceFolders '\state.packages.json')
|
||||
$state = $stateContent | ConvertFrom-Json
|
||||
$packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user