run visual studio from terminal - bash

I use Bash terminal on Windows. And I confused how can I run the Visual Studio solution from terminal?
For example
open the terminal
git clone https://github.com/somerepository.git
cd somerepository
*VISUAL-STUDIO* somerepository.sln
Just only.
What can I write instead of VISUAL-STUDIO
UPD.
I use "Git For Windows", its provides a BASH emulation.

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.

Visual Studio alternative of command "code ."

We've all seen this command sequence:
git clone [someRepo]
cd [someRepo]
code .
This will clone some repo, get into the folder and open it using Visual Studio Code. Without going into arguments whether VSCode or VS is better - I do use Visual Studio. Is there some VS command that is similar to "code .", that will open some solution directly from git bash/powershell/cmd?
Thanks in advance!
As an improvement of my first question you can use :
git clone [someRepo]
cd [someRepo]
start devenv .
It will open visual studio with the current directory.

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.

Visual Studio Code "Git not found"

I have Windows10 with the Ubuntu bash and Visual Studio Code.
Every time I start Visual Studio Code it prompts a warning saying:
Git not found. Install it or configure it using the 'git.path' setting
I got git actually installed through the bash terminal:
# which git
/usr/bin/git
How can I instruct Visual Studio Code to use that git installed in the bash terminal?
I have tried through the git.path setting but I am not sure how to set the path to something that is relative to the bash terminal.
If you're running Visual Studio Code on Windows, you also need to install Git for Windows. VsCode currently can't access git on the linux subsystems.

How to embed command shell in Visual Studio

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.

Resources