Skip to content

Instantly share code, notes, and snippets.

@anderslanglands
Created August 15, 2021 03:52
Show Gist options
  • Save anderslanglands/56caaf7617185b9d4627c03b8ec89ecf to your computer and use it in GitHub Desktop.
Save anderslanglands/56caaf7617185b9d4627c03b8ec89ecf to your computer and use it in GitHub Desktop.
conda vcvars setup
# Setup VS environment
cmd.exe /c "set > %temp%\vcvars_before.txt"
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars_2019.txt"
Get-Content "$env:temp\vcvars.txt" | Foreach-Object {
if ($_ -match "^(.*?)=(.*)$") {
Set-Content "env:\$($matches[1])" $matches[2]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment