How to open a Visual Studio solution file from the command line
Today I was at Windows command prompt after execution git clone https://...MySolution.git
and wanted to open a .sln (i.e. solution file) from the new directory of the cloned repo.
What is the command for opening this new solution in Visual Studio? Suppose the relative path/MySolution/MySolution.sln
If you haven't already cd MySolution
, but are still in the directory you made from git clone
, just type
start MySolution/MySolution.sln
and click Enter.
This will open whatever version of Visual Studio you currently have set to open with files .sln
on Windows.
If you don't mind using PowerShell, try WhatsNew . Once installed, you can simply type sln
to open the solution file in this directory.