Add a script for restoring Visual Studio

This commit is contained in:
Manuel Thalmann 2023-07-02 16:14:10 +02:00
parent d6df09358c
commit ca681c1497

View file

@ -31,4 +31,20 @@ $null = New-Module {
"--quiet");
}
}
function Restore-VisualStudio([Context] $context) {
Write-Host "Restoring Visual Studio";
foreach ($version in $versions) {
Write-Information "Restoring $($version[1]): $($version[2])";
$configFileName = Get-ConfigPath $context $version[0];
$arguments = "";
if (Test-Path $configFileName) {
$arguments = "--config `"$configFileName`"";
}
choco install -y $version[0] --params "$arguments";
}
}
}