views:

544

answers:

4

Is there any way to tell visual studio to not include a project when building the solution without just removing the project from the solution?

The situation I have is that one project in a solution requires a plugin/tool/library that I don't have installed, but another developer on our team does. So when I try to build the solution, I get compilation errors. It's a unit testing project, so removing it from compilation wouldn't affect the function of the application.

I don't want to remove the project from the solution, because he would then just need to re-add it after I check in the solution (and then I would need to remove it when I check it out, ad infinitum).

+1  A: 

A quick fix is to unload the project. This is a local setting so it won't change the solution or the project.

Marnix van Valen
+1 Just was posting that.
j0tt
+9  A: 

Go to the "Build" dropdown, choose "Configuration Manager", and you can select which configuration you want to update. Then in the list of project below, deselect the "Build" checkmark on the project you want to exclude from the build.

Lunchy
You may want to be careful with this. Changing the build configuration changes the solution file. If you commit that change to source control it will affect all other developers using that solution.
Marnix van Valen
+1  A: 

Right Click on Solution>Configuration Manager...

Here you can see a grid with a Build column with checkboxes, just uncheck the project you don't want to be build.

jmservera
opps, Lunchy did explain it at the same time.You can create a solution configuration for you (see Active solution configuration) this way you will not have to check-out/check-in each time.
jmservera
A: 

if you unload the project, then other projects that have any reference to the project that you unload, will throw build error during compilation

Murad Mohd Zain