Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Workloads/rust/configuration.winget
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,45 @@ resources:
winget:
securityContext: elevated

- type: Microsoft.WinGet/Package
name: VisualStudioBuildTools
properties:
id: Microsoft.VisualStudio.2022.BuildTools
source: winget
acceptAgreements: true
metadata:
description: Install Visual Studio 2022 Build Tools (host for the MSVC C++ tools that the Rust msvc toolchain links against)
winget:
securityContext: elevated

- type: Microsoft.DSC.Transitional/RunCommandOnSet
name: VSBuildToolsVCWorkload
dependsOn:
- VisualStudioBuildTools
properties:
executable: powershell
arguments:
"0": -NoProfile
"1": -NoLogo
"2": -Command
"3": >-
$ErrorActionPreference = 'Stop';
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
$bootstrapper = Join-Path $env:TEMP 'vs_BuildTools.exe';
Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_BuildTools.exe' -OutFile $bootstrapper -UseBasicParsing;
$proc = Start-Process -FilePath $bootstrapper -ArgumentList @('--quiet','--wait','--norestart','--nocache','--add','Microsoft.VisualStudio.Workload.VCTools','--includeRecommended') -Wait -PassThru;
if ($proc.ExitCode -ne 0 -and $proc.ExitCode -ne 3010) { throw "vs_BuildTools.exe exited with code $($proc.ExitCode)" }
treatAsArray: true
metadata:
description: Add the VCTools (Desktop development with C++) workload by running the VS bootstrapper directly — installs link.exe and the Windows SDK required by the Rust msvc toolchain
winget:
securityContext: elevated

- type: Microsoft.DSC.Transitional/RunCommandOnSet
name: InstallStableToolchain
dependsOn:
- Rustup
- VSBuildToolsVCWorkload
properties:
executable: powershell
arguments:
Expand Down
Loading