Created
September 23, 2019 07:37
-
-
Save ArthurHNL/b29f008cbc7a159a6ae82a7152b1cb2a to your computer and use it in GitHub Desktop.
Enter VSDevShell from a stand-alone powershell script
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
$vsPath = &(Join-Path ${env:ProgramFiles(x86)} "\Microsoft Visual Studio\Installer\vswhere.exe") -property installationpath | |
Import-Module (Join-Path $vsPath "Common7\Tools\vsdevshell\Microsoft.VisualStudio.DevShell.dll") | |
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation |
A slightly more future proof line #2:
Import-Module (Get-ChildItem $vsPath -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName
Works fine with Windows 11 and VS2022 Pro
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@AlQuemiste Thanks!