2021-04-27 01:27:45 +08:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2024-07-04 11:01:35 +08:00
|
|
|
param([string]$SasToken)
|
2021-04-27 01:27:45 +08:00
|
|
|
|
2024-07-04 11:01:35 +08:00
|
|
|
if (Test-Path "$PSScriptRoot/utility-prefix.ps1") {
|
|
|
|
. "$PSScriptRoot/utility-prefix.ps1"
|
|
|
|
}
|
2021-04-27 01:27:45 +08:00
|
|
|
|
2024-04-26 09:25:03 +08:00
|
|
|
# See https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history
|
2024-09-17 08:40:40 +08:00
|
|
|
# 17.11.3
|
|
|
|
$VisualStudioBootstrapperUrl = 'https://download.visualstudio.microsoft.com/download/pr/030a0062-e1e5-4a6c-9385-a6f146dbd9db/85d31bd580a0b36936164315bd423d22af90f90d180a540ef4245522e0bcd085/vs_Enterprise.exe'
|
2021-04-27 01:27:45 +08:00
|
|
|
$Workloads = @(
|
|
|
|
'Microsoft.VisualStudio.Workload.NativeDesktop',
|
|
|
|
'Microsoft.VisualStudio.Workload.Universal',
|
2023-09-16 06:01:12 +08:00
|
|
|
'Microsoft.VisualStudio.Component.UWP.VC.ARM64',
|
2021-04-27 01:27:45 +08:00
|
|
|
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
|
2023-08-15 04:58:43 +08:00
|
|
|
'Microsoft.VisualStudio.Component.VC.ASAN',
|
2021-04-27 01:27:45 +08:00
|
|
|
'Microsoft.VisualStudio.Component.VC.ATL',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.ATLMFC',
|
2022-04-16 06:33:07 +08:00
|
|
|
'Microsoft.VisualStudio.Component.VC.ATL.ARM64',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.MFC.ARM64',
|
2024-07-04 11:01:35 +08:00
|
|
|
'Microsoft.VisualStudio.Component.Windows11SDK.22621',
|
|
|
|
'Microsoft.VisualStudio.Component.Windows10SDK.20348',
|
2021-04-27 01:27:45 +08:00
|
|
|
'Microsoft.Net.Component.4.8.SDK',
|
2021-09-12 04:43:19 +08:00
|
|
|
'Microsoft.Net.Component.4.7.2.TargetingPack',
|
2021-04-27 01:27:45 +08:00
|
|
|
'Microsoft.Component.NetFX.Native',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.Llvm.Clang',
|
2022-04-16 06:33:07 +08:00
|
|
|
'Microsoft.VisualStudio.ComponentGroup.UWP.VC.BuildTools',
|
|
|
|
'Microsoft.VisualStudio.Component.VC.CMake.Project'
|
2021-04-27 01:27:45 +08:00
|
|
|
)
|
|
|
|
|
2024-07-04 11:01:35 +08:00
|
|
|
$vsArgs = @('--quiet', '--norestart', '--wait', '--nocache')
|
|
|
|
foreach ($workload in $Workloads) {
|
|
|
|
$vsArgs += '--add'
|
|
|
|
$vsArgs += $workload
|
2021-04-27 01:27:45 +08:00
|
|
|
}
|
|
|
|
|
2024-07-04 11:01:35 +08:00
|
|
|
DownloadAndInstall -Name 'Visual Studio' -Url $VisualStudioBootstrapperUrl -Args $vsArgs
|