Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start Visual Studio solution with a project unloaded

Tags:

Is it possible to start Visual Studio with a project unloaded (unavailable at start)?

The reason for this is that, when starting, I often find that Deployment Projects often hangs for about a minute when starting, and they aren't used that often either.

Setting these projects to unavailable and saving the solution doesn't make any change to project file, so if anyone has any suggestions on how to do this (either in Visual Studio proper, or through modifying the XML in the .sln file) I'd appreciate it.

Thanks in advance.

Edit: 2020-09-14: In the interests of keeping this question up to date, I have changed the accepted answer to the one by Johny Skovdal. The gist of this is that Visual Studio now offers this ability built in (link) via .slnf files.

like image 591
Dan Atkinson Avatar asked Feb 25 '11 13:02

Dan Atkinson


People also ask

How do I fix an unloaded project in Visual Studio?

Right click on the project folder and click Reload project. You will see the projects and folders that you originally had. You will see .

How do I load an unloaded project in Visual Studio?

In Solution Explorer, select the projects you want to load (press Ctrl while clicking to select more than one project), and then right-click on the project and choose Reload Project. Visual Studio will remember which projects are loaded the next time you open the solution locally.

Why is my Visual Studio project unloaded?

Why does this happen? Generally, it is because the path of project has been changed or its name has been changed. Regardless of the changed path or name, Visual Studio failed to load the project because it could not be found based on the original path.

How do I run a particular project in a solution in Visual Studio?

Visual Studio allows you to specify how more than one project is run when you press F5 (Start with Debugging), or Ctrl+F5 (Start without debugging), or use the toolbar button to launch your application.


1 Answers

As of Visual Studio 2019, this is now a native feauture called "Solution Filtering", which allows you to have different .slnf files you can open instead of your sln file. This keeps the projects you choose unloaded from the get go. This has dramatically increased our solution performance! :)

As for keeping everything unloaded to begin with, there is also a new flag in Visual Studio 2019:

devenv /donotloadprojects MySln.sln

From there you can then load the projects you want to include, and then create solution filters, so you can open that the next time around with only those projects preloaded. :)

like image 138
Johny Skovdal Avatar answered Sep 26 '22 01:09

Johny Skovdal