Skip to content

Commit 4d38de6

Browse files
committed
differentiate terminal from shells
1 parent 8d3ed36 commit 4d38de6

File tree

5 files changed

+49
-31
lines changed

5 files changed

+49
-31
lines changed

docs/framework/app-domains/how-to-view-the-contents-of-the-gac.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Use the [global assembly cache tool (gacutil.exe)](../tools/gacutil-exe-gac-tool
1919

2020
## View the assemblies in the GAC
2121

22-
To view a list of the assemblies in the global assembly cache, open a [command-line shell for developers](../tools/developer-command-prompt-for-vs.md)), and then enter the following command:
22+
To view a list of the assemblies in the global assembly cache, open a [command-line shell for developers](../tools/developer-command-prompt-for-vs.md), and then enter the following command:
2323

2424
```shell
2525
gacutil -l

docs/framework/app-domains/install-assembly-into-gac.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ gacutil -i <assembly name>
4040

4141
In this command, *\<assembly name>* is the name of the assembly to install in the global assembly cache.
4242

43-
If *gacutil.exe* isn't in your system path, use a [command-line shell for developers](../tools/developer-command-prompt-for-vs.md)).
43+
If *gacutil.exe* isn't in your system path, use a [command-line shell for developers](../tools/developer-command-prompt-for-vs.md).
4444

4545
The following example installs an assembly with the file name *hello.dll* into the global assembly cache.
4646

docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ The .NET Framework CLR installed with .NET Framework is versioned separately. Th
202202

203203
- **The Clrver.exe tool**
204204

205-
Use the [CLR Version tool (Clrver.exe)](../tools/clrver-exe-clr-version-tool.md) to determine which versions of the CLR are installed on a computer. Open a [command-line shell for developers](../tools/developer-command-prompt-for-vs.md)) and enter `clrver`.
205+
Use the [CLR Version tool (Clrver.exe)](../tools/clrver-exe-clr-version-tool.md) to determine which versions of the CLR are installed on a computer. Open a [command-line shell for developers](../tools/developer-command-prompt-for-vs.md) and enter `clrver`.
206206

207207
Sample output:
208208

docs/framework/tools/developer-command-prompt-for-vs.md

Lines changed: 46 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ helpviewer_keywords:
1010
- "developer PowerShell"
1111
- "Visual Studio terminal"
1212
ms.assetid: 94fcf524-9045-4993-bfb2-e2d8bad44219
13+
no-loc: cmdlet
1314
---
1415
# Command-line shells for developers
1516

16-
Visual Studio 2019 includes three command-line shells for developers:
17+
Visual Studio 2019 includes two command-line shells for developers:
1718

18-
- Developer Command Prompt for Visual Studio
19-
- Developer PowerShell
20-
- Visual Studio terminal
19+
- **Developer Command Prompt for Visual Studio** - A standard command prompt with certain environment variables set to make using command-line developer tools easier.
20+
- **Developer PowerShell** - More powerful than a command prompt. For example, you can pass the output of one command (known as a *cmdlet*) to another cmdlet.
2121

22-
All three of these tools have specific environment variables set that enable you to use command-line developer tools more easily. After opening one of these windows, you can enter the commands for different utilities without having to know where they're located. The commands you can run include:
22+
Both shells have specific environment variables set that enable you to use command-line developer tools more easily. After opening one of these shells, you can enter the commands for different utilities without having to know where they're located. The commands you can run include:
2323

2424
- [`MSBuild`](/visualstudio/msbuild/msbuild-command-line-reference), to build a project or solution.
2525
- [.NET Framework tools](index.md), such as [`clrver`](clrver-exe-clr-version-tool.md) and [`ildasm`](ildasm-exe-il-disassembler.md).
@@ -29,39 +29,39 @@ All three of these tools have specific environment variables set that enable you
2929

3030
:::image type="content" source="media/developer-command-prompt-for-vs/command-prompt.png" alt-text="Developer Command Prompt for Visual Studio showing clrver tool":::
3131

32-
When you open one of these windows from Visual Studio, it opens to the directory of your current solution (if you have a solution loaded). This behavior makes it convenient to run commands against the solution or its projects.
32+
Starting in Visual Studio 2019 version 16.5, Visual Studio includes an integrated **terminal** that can host either of these shells (Developer Command Prompt and Developer PowerShell). You can also open multiple tabs of each shell. The Visual Studio terminal is built on top of [Windows Terminal](/windows/terminal/). To open the terminal in Visual Studio, choose **View** > **Terminal**.
3333

34-
## Prerequisites
34+
:::image type="content" source="media/developer-command-prompt-for-vs/vs-terminal.png" alt-text="Visual Studio terminal showing multiple tabs":::
3535

36-
- [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019)
36+
When you open one of the developer shells from Visual Studio, either as a separate app or in the Terminal window, it opens to the directory of your current solution (if you have a solution loaded). This behavior makes it convenient to run commands against the solution or its projects.
3737

38-
## Developer Command Prompt
38+
## Prerequisites
3939

40-
There are a few ways you can open Developer Command Prompt for Visual Studio, including from Visual Studio, from the Windows Start menu, or by running the command to start Developer Command Prompt for Visual Studio.
40+
- [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019)
4141

42-
### Start the command prompt from inside Visual Studio
42+
## Start the shell from inside Visual Studio
4343

44-
Follow these steps to open Developer Command Prompt from within Visual Studio:
44+
Follow these steps to open Developer Command Prompt or Developer PowerShell from within Visual Studio:
4545

4646
1. Open Visual Studio.
4747

48-
1. On the menu bar, choose **Tools** > **Command Line** > **Developer Command Prompt**.
48+
1. On the menu bar, choose **Tools** > **Command Line** > **Developer Command Prompt** or **Developer PowerShell**.
4949

5050
![Command prompt menu item in Visual Studio](./media/developer-command-prompt-for-vs/vs-menu.png)
5151

52-
### Search for the command prompt on your machine
52+
### Use the Windows Start menu
5353

54-
You may have multiple command prompts, depending on the version of Visual Studio and any additional SDKs and workloads you've installed. If the following steps don't work, you can try to [manually locate the files on your machine](#manually-locate-the-files-on-your-machine) or [start the command prompt from inside Visual Studio](#start-the-command-prompt-from-inside-visual-studio).
54+
You may have multiple command prompts, depending on the version of Visual Studio and any additional SDKs and workloads you've installed. If the following steps don't work, you can try to [manually locate the files on your machine](#manually-locate-the-files-on-your-machine) or [start the shell from inside Visual Studio](#start-the-shell-from-inside-visual-studio).
5555

5656
#### Windows 10
5757

5858
1. Select **Start** ![Windows logo key on the keyboard.](./media/developer-command-prompt-for-vs/windows-logo-key-graphic.png) and scroll to the letter **V**.
5959

6060
1. Expand the **Visual Studio 2019** folder.
6161

62-
1. Choose **Developer Command Prompt for VS 2019** (or the command prompt you want to use).
62+
1. Choose **Developer Command Prompt for VS 2019** or **Developer PowerShell for VS 2019**.
6363

64-
Alternatively, you can start typing the name of the command prompt in the search box on the taskbar, and choose the result you want as the result list starts to display the search matches.
64+
Alternatively, you can start typing the name of the shell in the search box on the taskbar, and choose the result you want as the result list starts to display the search matches.
6565

6666
![Animated gif showing the search behavior on Windows 10](./media/developer-command-prompt-for-vs/windows10-search.gif)
6767

@@ -71,47 +71,65 @@ You may have multiple command prompts, depending on the version of Visual Studio
7171

7272
1. On the **Start** screen, press **Ctrl**+**Tab** to open the **Apps** list, and then press **V**. This brings up a list that includes all installed Visual Studio command prompts.
7373

74-
1. Choose **Developer Command Prompt for VS 2019** (or the command prompt you want to use).
74+
1. Choose **Developer Command Prompt for VS 2019** or **Developer PowerShell for VS 2019**.
7575

7676
#### Windows 7
7777

7878
1. Choose **Start** and then expand **All Programs**.
7979

80-
1. Choose **Visual Studio 2019** > **Visual Studio Tools** > **Developer Command Prompt for VS 2019**, or the command prompt you want to use.
80+
1. Choose **Visual Studio 2019** > **Visual Studio Tools** > **Developer Command Prompt for VS 2019** or **Developer PowerShell for VS 2019**.
8181

8282
![Windows 7 Start menu with the command prompt highlighted](./media/developer-command-prompt-for-vs/windows7-menu.png)
8383

8484
If you have other SDKs installed, such as the [Windows 10 SDK](https://developer.microsoft.com/windows/downloads/windows-10-sdk) or [previous versions](https://developer.microsoft.com/windows/downloads/sdk-archive), you may see additional command prompts. Check the documentation for the individual tools to determine which version of the command prompt you should use.
8585

8686
### Manually locate the file
8787

88-
Usually, the shortcuts for the command prompts you have installed are placed in the **Start Menu** folder for Visual Studio, such as in *%ProgramData%\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools*. But if searching for the command prompt doesn't produce the expected results, you can try to manually locate the shortcut on your machine. Search for the name of the command prompt file, which is *VsDevCmd.bat*, or go to the Tools folder, such as *%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools* (path changes according to your Visual Studio version, edition, and installation location).
88+
Usually, the shortcuts for the shells you have installed are placed in the **Start Menu** folder for Visual Studio, such as in *%ProgramData%\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools*. But if searching for the command prompt doesn't produce the expected results, you can try to manually locate the files on your machine.
8989

90-
Once you've located the command prompt file, open it using the following commands in a regular command prompt window (but change the directory to match your installation of Visual Studio):
90+
#### Developer Command Prompt
91+
92+
Search for the name of the command prompt file, which is *VsDevCmd.bat*, or go to the Tools folder for Visual Studio, such as *%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools* (path changes according to your Visual Studio version, edition, and installation location).
93+
94+
Once you've located the command prompt file, open it by entering the following command in a regular command prompt window:
9195

9296
```cmd
93-
cd %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools
94-
VsDevCmd.bat
97+
"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
9598
```
9699

97-
Or enter the following command from the Windows **Run** dialog box:
100+
Or enter the following command in the Windows **Run** dialog box:
98101

99102
```cmd
100103
%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
101104
```
102105

103-
## Developer PowerShell
106+
> [!TIP]
107+
> You'll need to edit the path to match your Visual Studio installation.
108+
109+
#### Developer PowerShell
104110

105-
To open [Developer PowerShell](https://devblogs.microsoft.com/visualstudio/the-powershell-you-know-and-love-now-with-a-side-of-visual-studio/), choose **Tools** > **Command Line** > **Developer PowerShell** from the menu bar.
111+
Search for a file named *Microsoft.VisualStudio.DevShell.dll*, or go to the Tools folder for Visual Studio, such as *%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools* (path changes according to your Visual Studio version, edition, and installation location).
106112

107-
## Visual Studio Terminal
113+
Once you've located the Developer PowerShell assembly file, open it by entering the following command in a PowerShell window:
114+
115+
```powershell
116+
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'; Enter-VsDevShell 0449c295
117+
```
118+
119+
Or enter the following command in the Windows **Run** dialog box:
120+
121+
```cmd
122+
powershell -noexit -command "& { Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'; Enter-VsDevShell 0449c295 }"
123+
```
108124

109-
To open the integrated [Terminal](https://devblogs.microsoft.com/visualstudio/say-hello-to-the-new-visual-studio-terminal/) in Visual Studio, choose **View** > **Terminal** from the menu bar.
125+
> [!TIP]
126+
> You'll need to edit the path and instance ID (the final number) to match your Visual Studio installation. You can get the information from the *Target* value in the properties of the Developer PowerShell shortcut, which is located in the *%ProgramData%\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools* folder.
110127
111128
## See also
112129

113130
- [Developer PowerShell](https://devblogs.microsoft.com/visualstudio/the-powershell-you-know-and-love-now-with-a-side-of-visual-studio/)
114131
- [Say hello to the new Visual Studio terminal](https://devblogs.microsoft.com/visualstudio/say-hello-to-the-new-visual-studio-terminal/)
132+
- [Windows Terminal](/windows/terminal/)
115133
- [.NET Framework Tools](index.md)
116134
- [Manage external tools](/visualstudio/ide/managing-external-tools)
117135
- [Use the Microsoft C++ toolset from the command line](/cpp/build/building-on-the-command-line)
16.1 KB
Loading

0 commit comments

Comments
 (0)