mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
Refactor Get-DotnetFrameworkTools and allow multiple SDKs installation (#5464)
This commit is contained in:
@@ -226,15 +226,14 @@ function Get-DotnetRuntimes {
|
||||
|
||||
function Get-DotnetFrameworkTools {
|
||||
$path = "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\*\*\NETFX*"
|
||||
$frameworkVersions = @()
|
||||
Get-ChildItem -Path $path -Directory | ForEach-Object {
|
||||
$frameworkVersions += ($_.Name -Split(" "))[1]
|
||||
$frameworkPath = $_.Fullname -Replace " \d+\.\d+(\.\d+)?", " <version>"
|
||||
}
|
||||
Get-ChildItem -Path $path -Directory | Group-Object {
|
||||
$_.Fullname -Replace " \d+\.\d+(\.\d+)?", " <version>"
|
||||
} | ForEach-Object {
|
||||
[PSCustomObject]@{
|
||||
Versions = $frameworkVersions -Join " "
|
||||
Path = $frameworkPath
|
||||
Versions = $_.Group.Name | ForEach-Object { $_.Split(" ")[1] }
|
||||
Path = $_.Name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Get-PowerShellAzureModules {
|
||||
|
||||
Reference in New Issue
Block a user