How to open terminal for executing shell commands in Visual Studio(Community Version)?
This question is related to
visual-studio
Right click on your solution and above properties is the option open Command Line which gives access to default cmd, powershell and developer command prompt alternatively you can use the shortcuts Alt+Space for Default (cmd), Shift+Alt+, for Dev (cmd), Shift+Alt+. for powershell
In Visual Studio 2019, You can open Command/PowerShell window from Tools > Command Line >
If you want an integrated terminal, try
BuiltinCmd: https://marketplace.visualstudio.com/items?itemName=lkytal.BuiltinCmd
You can also try WhackWhackTerminal (does not support VS 2019 by this date).
https://marketplace.visualstudio.com/items?itemName=dos-cafe.WhackWhackTerminal
In Visual Studio 2019- Tools > Command Line > Developer Command Prompt.enter image description here
Microsoft just included an integrated Windows Terminal in Visual Studio version 16.3 Preview 3. Go to Tools > Options > Preview Features, enable the Experimental VS Terminal option and restart Visual Studio.
https://devblogs.microsoft.com/visualstudio/say-hello-to-the-new-visual-studio-terminal/
Now vs has built-in terminal
View > Terminal (Ctrl+")
To change default terminal
Tools > Options - Terminal > Set As Default
Before Visual Studio 2019
From comments best answer is from @Hans Passant
Tools > External Tools > Add
Title: Terminal (or name it yourself)
Command=cmd.exe Or Command=powershell.exe
Arguments= /k
Initial Directory=$(ProjectDir)
Tools > Terminal (or whatever you put in title)
Enjoy!
View -> debug console (Ctrl+Shift+Y) next to debug console is terminal
To open the terminal:
Please find more about integrated terminal here https://code.visualstudio.com/docs/editor/integrated-terminal
As tricky solution you can use Package Manager Console to execute cmd or PowerShell commends
Shortcut for Package Manager Console Alt T N O
Tested on Visual Studio 2017 Community Version
Also its available now as part of Visual Studio version 16.3 Preview 3
Shortcut Ctrl+` same as Visual Studio Code
Not sure if this will help, but I usually pull the command prompt up by going into "Synchronization" tab in Team Explorer and clicking on "Actions"
When the command prompt opens it is in the directory of the project.
Source: Stackoverflow.com