Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Default Visual Studio Command Prompt Location

How to set the default visual studio command prompt location so that I can go straight to my project's directory instead of using the usual navigation.

like image 986
Lch Avatar asked May 26 '11 08:05

Lch


People also ask

How do I change the path in Visual Studio?

In Visual Studio, click Tools > Options. Expand Projects and Solutions and click Locations. The Projects location field defines the default location for storing new projects. You can change this path if you are using a different working folder.

How do I change the path in Visual Studio code terminal?

From the main menu, go to File > Preferences > Settings, and click on the “Open Settings (JSON)” icon shown below. Add a section, “terminal.


1 Answers

For Visual Studio 2017 Command Prompt, you need to set environment variable VSCMD_START_DIR to the directory where you want to end up after the command prompt initializes.

I use this script:

set VSCMD_START_DIR=%1 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"

It accepts the directory as the first (and only) argument.

like image 123
Antonín Procházka Avatar answered Sep 21 '22 15:09

Antonín Procházka