Created
January 26, 2026 18:26
-
-
Save AArnott/3c2b32fab2fe1afdd5ca68e50be2e952 to your computer and use it in GitHub Desktop.
A powershell script to put on your system PATH so you can add VS tools to your PATH in any terminal.
This file contains hidden or 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
| $vs = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -prerelease -format json -latest | ConvertFrom-Json | |
| $instanceId = $vs[0].instanceId | |
| $installationPath = $vs[0].installationPath | |
| Import-Module "$installationPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" | |
| Enter-VsDevShell $instanceId -SkipAutomaticLocation -Arch x64 -HostArch x64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment