Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I open a project without opening its associated solution in Visual Studio?

I have a solution that contains few projects. The problem is that when I want to open just one of the projects by clicking on the specific .csproj file, it opens all the solution.

How can I open just one project?

Thanks.

like image 455
Itay.B Avatar asked Jan 13 '11 10:01

Itay.B


People also ask

How do I open a project file without SLN?

Answers. Click on File -> Open Web Site... and choose the folder where you unzipped those files.

How do I separate a project from solution in Visual Studio 2019?

Copy the project folder into separate folder, open the . csproj file, press CTRL + S , it will open the save dialog and you will save the . sln file. That is it.

How do I open an existing project in Visual Studio?

Open Visual Studio. On the start window, select Open a project or solution. Visual Studio opens an instance of File Explorer, where you can browse to your solution or project, and then select it to open it.

How do I add a project to an existing solution?

To add an existing project to a solutionIn Solution Explorer, select the solution. On the File menu, point to Add, and click Existing Project. In the Add Existing Project dialog box, locate the project you want to add, select the project file, and then click Open. The project is added to the selected solution.


3 Answers

You can create a new solution, and add this project to the solution. Then this project will have a solution of it's own.

like image 191
0x26res Avatar answered Sep 30 '22 19:09

0x26res


It's a hack but rename the .sln file to some other extension temporarily, then double click the csproj. Visual Studio seems to have intellismarts about detecting solutions.

like image 26
Jafin Avatar answered Sep 30 '22 21:09

Jafin


The only way I have been able to do this is to remove the project from the main solution and save it and close it.

You should now be able to open the solution and the project file independently.

Note: opening the csproj file will create a new solution for you.

like image 33
user3401346 Avatar answered Sep 30 '22 21:09

user3401346