Created
December 11, 2018 01:23
-
-
Save shanselman/35734b5c6bf5d03f6c84bebfb6905932 to your computer and use it in GitHub Desktop.
PowerShell Profile addition to take VSVars and make it automatic in PS1
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\2017\Community\Common7\Tools" | |
cmd /c "VsDevCmd.bat&set" | | |
foreach { | |
if ($_ -match "=") { | |
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" | |
} | |
} | |
popd | |
Write-Host "`nVisual Studio 2017 Command Prompt variables set." -ForegroundColor Yellow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment