How to embed command shell in Visual Studio - windows

I would like to be able to embed a command line interpreter inside a dockable window in Visual Studio. Is there any nice way to do this?

See the VS Command shell project

Checkout Open Command Line by Mads Kristensen. note it doesn't really "embed" the shell in VS, rather it adds a keyboard shortcut to open the shell at the project directory
it supports bash, powershell, git bash, ...etc

In Visual Studio click Tools -> NuGet Package Manager -> Package Manager Console
It embeds a cmd prompt with everything on your %PATH% you'd expect.

Related

Using git-bash as integrated terminal in Visual studio

Git bash integrates well into VS Code but not Visual studio. In VS Code, it opens in the terminal tab but in Visual Studio (17.4.2), it opens as a separate window.
Is there a way I can get git bash to open as an integrated terminal, just like Developer Powershell?
I couldn't reproduce this problem. git-bash runs in the terminal tab as expected.
What I did:
From the menu choose Tools -> Options
In the Options dialog choose Environment -> Terminal
Add a new Profile with
Name: Git Bash
Shell Location: C:\Program Files\Git\bin\bash.exe
Arguments: -i -l
The terminal in Visual Studio is based on the Windows Terminal. I used the 'Git Bash' profile in Windows Terminal as the template for the profile in Visual Studio.

alternative to 'code' visual studio in pycharm

Some of my coworkers use visual studio code. Personally I am already used to pycharm. I've seen my colleagues using code filename in the VSC terminal, so that it opens the file filename in a new VSC tab. Is there a similar alternative in pycharm?
Yes you can create a CLI launcher in the Tools menu "Create Command-line launcher"
The last part of the path is the name you decide to give the launcher e.g "pcharm" or "pyc" (anything of your choice) and save it.
Reload the terminal, and run the command with your file name.

How to run VS Code program on command prompt?

New to both VS Code and Visual Studio... When I run my C# program in Visual Studio, the command prompt opens and the program is run there. In VS Code however, the program is run in the integrated debug console.
Is there a way I can set VS Code to open up cmd prompt and run my program there, rather than the VS Code debug console?
Thanks.
Go to settings and search "Terminal: Explorer Kind". Then set it to external select external.

How to open file in a specific application from the command line

I want to open a .md file in a repo in visual studio code from my command line. Does anyone know the command for this?
I am using the bash shell.
First, you need to have Visual Studio Code CLI. ( Try code --version in terminal to check if it's already installed or not ). You have to install it manually on mac OSX (see below). In windows and linux, the command line interface code should be readily available in the PATH.
To install it (in MAC)
Launch VS Code.
Open the Command Palette (⇧⌘P) and type ‘shell
command’ to find the Shell Command: Install ‘code’ command in PATH
command.
After that you can use:
code filename
to open the filename in Visual Studio.
For more information, click
code --help will give you more information.
For example, code -r filename will open the file in already opened Visual Studio window.

Command Prompt in Visual Studio

I want to add a command prompt that opens in project folder when I right click my project to open a context menu -- see below:
I know how to create a command prompt link through Tools > External Tools but I don't know how to add that link to my context menu.
Could someone tell me how I can do this? Thanks.
P.S. I'm currently using the latest version of Visual Studio 2017 i.e. 15.4.5
You can use the Open Command Line extension to open a command prompt on the project's path.

Resources