views:

74

answers:

3

My VS solution has many projects. I am currently only working on some of them so I want CTRL+SHIFT+B to only build some. What's the best way to do it?

I thought about creating a new configuration but I would need to check it in and it does not seem right. I don't care if it will be only a "local" setting on my machine.

+2  A: 

Right-click on the Solution and choose "Configuration Manager". Un-check the "Build" columns for each one you don't want built.

David Stratton
this would affect all users of this solution, I want to only affect me
Yaron Naveh
A: 

Creating a new configuration would be the best way to do it.

Alternately, create a second solution file and only add the projects you're interested in. We've done that for a few of our enterprise products where a full solution would load dozens of projects. The main reason we did this is to cut down on the resources that VS uses. Name the solution something like "My Product - minimal build". You have the option of checking it in or not.

womp
Yaron Naveh
A solution file is essentially just a list of projects. Projects exist completely independent of a solution. You can add the same project to multiple solutions. If you have two solutions open that contain the same project, and you edit the project file in one window and switch over to the other window, Visual Studio will detect the changes and ask you if you want to update.
womp
So to answer your question specifically - yes, solution files simply reference a project. You could create a new solution file for yourself that had the build settings you wanted, and work with the same exact project files that everyone else was working with.
womp
A: 

Go to the solution explorer (CTRL+SHIFT+L for me), mark the projects you want to build, right-click them (SHIFT+F10 if you are a keyboard aficionado) and select "Build Selection"

sbi
this would affect all users of this solution, I want to only affect me
Yaron Naveh
@Yaron: No, this wouldn't affect the solution at all, let alone other users of it. (It's a way to only build selected projects instead of the whole solution.)
sbi