Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Command Prompt vs. a regular command prompt?

When I open a Visual Studio command prompt (for example, opened with menu Start -> Programs -> Microsoft Visual Studio 2008 -> Visual Studio Tools -> Visual Studio 2008 Command Prompt), I get:

Setting environment for using Microsoft Visual Studio 2008 x86 tools.  C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE> 

What kind of tools are available, and what are the most common uses of this command prompt?

like image 554
John B Avatar asked Jul 14 '09 13:07

John B


People also ask

Does Visual Studio 2019 have a command line tool?

Visual Studio 2019 includes two command-line shells for developers: Visual Studio Developer Command Prompt - A standard command prompt with certain environment variables set to make using command-line developer tools easier. Available since Visual Studio 2015. Visual Studio Developer PowerShell - More powerful than a command prompt.

How to use developer command prompt in Visual Studio?

Developer Command Prompt and Developer PowerShell 1 Prerequisites 2 Start the shell from inside Visual Studio. Open Visual Studio. ... 3 Use the Windows Start menu. You may have multiple command prompts, depending on the version of Visual Studio and any additional SDKs and workloads you've installed. 4 Manually locate the file. ...

How do I run Visual Studio Code from the command line?

Visual Studio Code has a powerful command line interface built-in that lets you control how you launch the editor. ... On macOS, you need to manually run the Shell Command: Install 'code' command in PATH command (available through the Command Palette ⇧⌘P (Windows, Linux Ctrl+Shift+P)).

How do I open vs code from the command line?

You can launch VS Code from the command line to quickly open a file, folder, or project. Typically, you open VS Code within the context of a folder. To do this, from an open terminal or command prompt, navigate to your project folder and type code .: Note: Users on macOS must first run a command ( Shell Command: Install 'code' command in PATH) ...


2 Answers

It basically just sets several of the Visual Studio binary locations into the PATH environment variable for that command window instance. This means you can use all the various commands and tools without having to include the full paths.

There's a partial list of some of the tools available on MSDN in .NET Framework Tools and Tools (.NET Framework).

like image 99
Simon P Stevens Avatar answered Oct 02 '22 20:10

Simon P Stevens


The Visual Studio command prompt is a convenient way to access the command line tools that ship with the .NET Framework SDK and, if installed the, Windows Platform SDK tools.

By providing the Visual Studio command prompt, Microsoft allows you to run these tools without requiring your PATH, INCLUDE, LIB and LIBPATH environment variables to contain all the additional paths to the various folders where Visual Studio and the .NET SDK are installed. Instead, these folder references are added on the fly when you start the Visual Studio command prompt allowing you to run the tools.

For example, if you open a regular command prompt you cannot run xsd.exe without changing to the directory "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin". However, in the Visual Studio command prompt you can just type xsd.exe /?, and it works.

Please see the MSDN article .NET Framework Tools for a complete list of the tools provided with Visual Studio 2008 SP1 and details on what they do.

like image 24
MikeD Avatar answered Oct 02 '22 20:10

MikeD