add VS build tools installation, tests, reports, made minor changes to current VS install helper functions

This commit is contained in:
Leonid Lapshin
2020-09-01 15:53:26 +03:00
parent dd518dff50
commit cf9a92d64e
9 changed files with 70 additions and 37 deletions

View File

@@ -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