How to open Visual Studio Solution File from the Command Prompt
Solution 1
If you haven't done cd MySolution
but are still in the directory from which you did the git clone
just type
start MySolution/MySolution.sln
and hit Enter.
This will open whatever version of Visual Studio you currently have set to open with .sln
files in Windows.
Solution 2
If you don't mind using PowerShell, you should try WhatsNew. Once installed, you can just type sln
to open the solution file in that directory.
Solution 3
Actually, you can also do directly \MySolution\MySolution.sln
or .\MySolution\MySolution.sln
and the solution will be opened.
I've been using it in CMD and Powershell with no problem.
Eric D. Johnson
Currently Learning about: The general magic and joys of programming in Typescript, Node, and C♯ ReactNative, Mithril, and AngularJS for Front End Development JAMstack with statically generated content for server-less good times and fast content loading Using Visual Studio as an IDE for .NET and SQL Server. How great God's love is for us!
Updated on July 09, 2022Comments
-
Eric D. Johnson almost 2 years
Today I was in the Windows Command Prompt after doing a
git clone https://...MySolution.git
and wanted to open the .sln (i.e., solution file) from the new directory of the cloned repo.What is the command to open this new solution in Visual Studio? Suppose the relative path is
/MySolution/MySolution.sln