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.
Visual Studio 2016 and later comes with an in-IDE terminal capable of running the Developer Powershell, Developer Command Prompt, etc. Is there a way to run a program from Visual Studio with CTRL + F5 so that it launches in the in-IDE terminal and not in a new Console window?
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.
I need to run web.exe file from my developer command prompt in Visual Studio 2013. By default, the command prompt is not installed in Visual Studio 2013.
Previously, I was using Visual Studio 2012. It had developer command prompt installed by default.
Does anyone know why VS2013 doesn't have developer command prompt by default? How can I setup developer command prompt for VS2013?
For some reason, it doesn't properly add an icon when running Windows 8+. Here's how I solved it:
Using Windows Explorer, navigate to:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2013
In that folder, you'll see a shortcut named Visual Studio Tools that maps to (assuming default installation):
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
Double-click the shortcut (or go to the folder above).
From that folder, copy the shortcut named Developer Command Prompt for VS2013 (and any others you find useful) to the first directory (for the Start Menu). You'll likely be prompted for administrative access (do so).
Once you've done that, you'll now have an icon available for the 2013 command prompt.
From VS2013 Menu Select "Tools", then Select "External Tools". Enter as below:
Title: "VS2013 Native Tools-Command Prompt" would be good
Command: C:\Windows\System32\cmd.exe
Arguments: /k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
Initial Directory: Select as suits your needs.
Click OK.
Now you have command prompt access under the Tools Menu.
I used a modified version of this answer - based on my experiences adding it to VS 2010:
Select Tools >> External Tools in Visual Studio
Click Add
Title: I use Visual Studio Command &Prompt
&P Makes P a alt-shortcut key (when menu active)
I originally used C, but that conflicts with the existing shortcut for Customize
Command: C:\Windows\System32\cmd.exe
Arguments: \k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat
/k keeps a secondary session active so the window doesn’t close on the .bat file
Initial Directory: I use $(ProjectDir) (from the dropdown)
Click OK.
Now you have command prompt access under the Tools Menu.
See also: Add command prompt to Visual C# Express 2010
You can simply go to Menu > All Programs > Visual Studio 2013. Select the folder link "Visual Studio Tools". This will open the folder. There is bunch of shortcuts for command prompt which you can use. They worked perfectly for me.
I think the trick here might be there are different versions for different processors, hence they put them all together.
I don't know if this changed recently -- the answer given by Samuel did not apply to me even though that link seemed authoritative.
A couple of things
1) For some reason, the folder in the start menu is called Visual Studio 2013, and not Microsoft Visual Studio 2013. Using the win8 apps interface you might see the 2010 entry Microsoft Visual Studio 2010, and since you don't see the new 2013 folder Microsoft Visual Studio 2013 next to it, you assume it isn't there. But it is.. Just a few page scrolls away..
2) It seems the Windows 8 (or 8.1 at least) cannot display sub-folders. I tried creating a folder underneath the Visual Studio 2013 folder with shortcuts, and the entire folder just didn't show.
3) Which is why what is installed is a shortcut. Not sure what the windows 7 behavior is with a shortcut in the start menu, but the apps menu just displays it like a folder. When you click on it, it brings you to the so-called missing shortcuts in explorer.
Final solution: under C:\ProgramData\Microsoft\Windows\Start Menu\Programs, create a new folder called Microsoft Visual Studio 2013. Copy the shortcuts from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts to that new folder. Then you'll have your icons using the windows 8 app interface under the heading which is the new folder name.
You'll also be able to just start typing from the start screen VS2013, and the icons will now show up.
Since any solution given so far will open the command prompt on the project folder, you would still have to navigate to the project's folder. If you are interested in getting the command prompt directly into the project's folder, here is my 2 steps:
Right-click in solution explorer on the project name (just under
the solution name) and choose the command "Open Folder in File
Explorer"
Once the Windows Explorer is open, just type in the
address bar "cmd" and then hit enter!
Et voila! Hope that helps
Visual studio command prompt is nothing but the regular command prompt where few environment variables are set by default. This variables are set in the batch script : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat . So basically to get a visual studio command prompt for a particular version, just open regular command prompt and run this batch script : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat (Change the visual studio version based on your installed version). Voila you have got the visual studio command prompt. You can write a script to run the batch file and open cmd.exe.
Works with VS 2017
I did installed Visual Studio Command Prompt (devCmd) extension tool.
You can download it here: https://marketplace.visualstudio.com/items?itemName=ShemeerNS.VisualStudioCommandPromptdevCmd#review-details
Double click on the file, make sure IDE is closed during installation. Open visual studio and Run Developer Command Prompt from VS2017
I'm using VS 2012, so I navigated to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools" and ran as administrator this "Developer Command Prompt for VS2012" shortcut. In command shell I pasted the suggested
aspnet_regiis -i
and as I suspected this did not yield any success on Windows 10:
So all I needed to do was "Turn Windows Features On/Off" at Control Panel and restart my machine to effect the changes. That did resolve the issue. Thanks.
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.