Visual Studio Build Tools Container
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
834 B

8 months ago
param([parameter()][string] $msvc="C:\msvc")
new-item -path $msvc -type directory -force
new-item -path "temp" -type directory -force
invoke-webrequest -outfile temp\visualstudio.release.chman
invoke-webrequest -outfile temp\vs_buildtools.exe
$arguments = @(
"--quiet", "--wait", "--norestart", "--nocache",
"--channeluri", ($pwd.path + "\temp\visualstudio.release.chman"),
"--installchanneluri", ($pwd.path + "\temp\visualstudio.release.chman"),
"--config", ($pwd.path + "\vs16.config"),
"--installpath", "$msvc"
$proc = Start-Process -FilePath "temp\vs_buildtools.exe" -ArgumentList $arguments
Remove-Item "temp" -Recurse
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$msvc", "Machine")