Unloading projects from a VS solution

Here's a nifty little VS feature that I keep forgetting about, then rediscovering and being amazed by how useful it is...

If you have a lot of projects in the same solution, but are only working on one at a time and getting irritated by how long it takes to build the others, you don't need to bother changing your solution configuration to disable them. Just right-click on a project and choose "Unload Project". You can later do the same thing to reload it.

For complex solutions, temporarily getting rid of the things you don't need can dramatically speed up Visual Studio and improve your build times.

I use this when I'm working on games that have projects for Windows and Xbox in the same solution, to filter out whichever platform I'm not currently testing on. I also use it when working on the XNA Framework itself. The solution for our main Windows assembly contains 14 different projects (a mixture of C#, C++, and unit test code), but with half of them unloaded I can still rebuild and test changes in just a few seconds.

Comments (2)

  1. JoelMartinez says:

    alternatively, you can make different build configurations that have different projects compiling or not.  I even do this for projects with dependencies between each other.  If I’m going to work on a project (A) that depends on another project (B), then I’ll just do a full solution build first, then pick the configuration where project B doesn’t get built.

  2. kselden says:

    As JoelMartinez said, you can just uncheck the project from building in the build configuration and setup multiple configurations.

    Unloading a project is so you can edit the project XML (right click an unloaded project). Adding post/pre build actions for example.

Skip to main content