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-开发者_如何学Python14: 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.
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. :)
The vsFunnel extension (with VS 2012/2013 support) allows selection of each single project to load, it's also possible to save and re-use the selection at later time:
http://visualstudiogallery.msdn.microsoft.com/5396fa4a-d638-471b-ac3d-671ccd2ea369
you can have multiple sln files, one sln file consist deployement projects, other sln file consist projects you need.? just copy your sln file and remove projects you dont need.
While the Solution Load Manager mentioned in the answer is not updated for VS2012, I found this other Solution Load Manager extension that works.
It is not as complete to where you can choose which projects to load (it load start-up project and its dependencies) but, it is better than loading all projects.
An interesting MSDN article explaining project loading.
For a homebrew solution, work needs to be done on the .suo file that is contained in a hidden directory where your solution file lives. For example, if your solution is called .\Business.sln, then the .suo file (for VS2015) is contained at: .\.vs\Business\.suo
You can play around with this file by making a backup, loading/unloading some projects, closing the solution, and restoring the backup; this will revert the change you made in the interim. Unfortunately, these backups would almost certainly break as soon as something about the solution changed such as the projects it contains, etc.
As well, this file is not text and I've never sunk the time into investigating if it's possible to migrate it to text and back.
This answer isn't a answer in the sense that it answers the question, but it's a lead in case anyone else reads and has an idea. I've wanted to source control a sort of blank-slate .suo file for years, along with a TFS source control hint to ignore such a file for source control binding. The intended result was that when users get a branch for the first time, their solutions default to loading no projects, allowing them to selectively load only what they want; however, with the source control hint no such changes would ever be picked up by TFS nor checked in, such that this setup imposed no administrative headache.
Dreams!
精彩评论