mirror of
https://github.com/actions/runner-images.git
synced 2025-12-28 20:58:32 +08:00
[Windows] Improve Visual Studio installation scripts to support Preview versions (#3850)
* Support Preview versions of Visual Studio * resolve comments * Fix test * fix tests
This commit is contained in:
@@ -14,7 +14,8 @@ $workLoadsArgument = [String]::Join(" ", $workLoads)
|
||||
|
||||
$releaseInPath = $toolset.visualStudio.edition
|
||||
$subVersion = $toolset.visualStudio.subversion
|
||||
$bootstrapperUrl = "https://aka.ms/vs/${subVersion}/release/vs_${releaseInPath}.exe"
|
||||
$channel = $toolset.visualStudio.channel
|
||||
$bootstrapperUrl = "https://aka.ms/vs/${subVersion}/${channel}/vs_${releaseInPath}.exe"
|
||||
|
||||
# Install VS
|
||||
Install-VisualStudio -BootstrapperUrl $bootstrapperUrl -WorkLoads $workLoadsArgument
|
||||
@@ -30,7 +31,7 @@ if ($instanceFolders -is [array])
|
||||
exit 1
|
||||
}
|
||||
|
||||
$vsInstallRoot = Get-VisualStudioPath
|
||||
$vsInstallRoot = (Get-VisualStudioInstance).InstallationPath
|
||||
|
||||
# Initialize Visual Studio Experimental Instance
|
||||
& "$vsInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit
|
||||
|
||||
Reference in New Issue
Block a user