Configures PowerShell to run as a Visual Studio Developer Command Prompt
APACHE-2.0 License
This PowerShell module allows you to configure your PowerShell session as a Visual Studio Developer Command Prompt by loading the environment variables from the VsDevCmd.bat batch file for a specified Visual Studio version.
NOTE:
posh-vsdev
requires PowerShell 5.0 or higher.
PS> Save-Module -Name posh-vsdev
PS> Install-Module -Name posh-vsdev -Scope CurrentUser
# Import the posh-vsdev module module
Import-Module posh-vsdev
# Get all installed Visual Studio instances
Get-VisualStudioVersion
# Get a specific version
Get-VisualStudioVersion -Version 14
# Use the Developer Command Prompt Environment
Use-VisualStudioEnvironment
# Restore the non-Developer environment
Reset-VisualStudioEnvironment
# Reset cache of Visual Studio instances
Reset-VisualStudioVersionCache
# Add posh-vsdev to your PowerShell profile
Add-VisualStudioEnvironmentToProfile -UseEnvironment