Created
May 3, 2020 11:07
-
-
Save vrischmann/0b4a187b9d2f4b586fde90df5659b9fe to your computer and use it in GitHub Desktop.
PowerShell profiles that applies the vcvarsalls.bat file from Visual Studio 2019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build" | |
# Adapt the argument `x86_amd64` if it's not what you need. Run the bat file to see what's available. | |
cmd /c "vcvarsall.bat x86_amd64 &set" | | |
foreach { | |
if($_ -match "(.*?)=(.*)") | |
{ | |
Set-Item -force -path "ENV:\$($matches[1])" -value "$($matches[2])" | |
} | |
} | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment