mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-15 06:19:21 +00:00
[Windows] Add back to documentation versions of Visual Studio Components (#1304)
* fix software report for visual studio extensions * resolve conflicts * fix issue with vs components * refactor code * add fliter to components extracting
This commit is contained in:
committed by
GitHub
parent
b7c69ef560
commit
b0a922fa52
@@ -1,10 +1,3 @@
|
||||
function Get-VisualStudioPackages
|
||||
{
|
||||
$packagePath = "$env:ProgramData\Microsoft\VisualStudio\Packages\_Instances\*\state.packages.json"
|
||||
$instanceFolders = Get-ChildItem -Path $packagePath
|
||||
(Get-Content -Path $instanceFolders | ConvertFrom-Json).packages
|
||||
}
|
||||
|
||||
function Get-VisualStudioVersion {
|
||||
$vsVersion = vswhere -format json | ConvertFrom-Json
|
||||
[PSCustomObject]@{
|
||||
@@ -14,12 +7,6 @@ function Get-VisualStudioVersion {
|
||||
}
|
||||
}
|
||||
|
||||
function Get-VisualStudioComponents {
|
||||
$vsPackages = Get-VisualStudioPackages | Where-Object type -in 'Component', 'Workload'
|
||||
$vsPackages | Sort-Object Id, Version | Select-Object @{n = 'Package'; e = {$_.Id}}, Version |
|
||||
Where-Object { $_.Package -notmatch "[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}" }
|
||||
}
|
||||
|
||||
function Get-WixVersion {
|
||||
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
||||
$installedApplications = Get-ItemProperty -Path $regKey
|
||||
@@ -36,7 +23,7 @@ function Get-VisualStudioExtensions {
|
||||
# Wix
|
||||
$vs = (Get-VisualStudioVersion).Name.Split()[-1]
|
||||
$wixPackageVersion = Get-WixVersion
|
||||
$wixExtensionVersion = (Get-VisualStudioPackages | Where-Object {$_.id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version
|
||||
$wixExtensionVersion = (Get-VisualStudioPackages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version
|
||||
|
||||
# WDK
|
||||
$wdkPackageVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit'
|
||||
|
||||
Reference in New Issue
Block a user