Yaron Naveh
Yaron Naveh

Reputation: 24436

Visual Studio: How to build only some projects

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.

Upvotes: 5

Views: 21728

Answers (5)

RonnieScotland
RonnieScotland

Reputation: 180

Simply right click on the project you want to build in Solution Explorer, and select Build. It will build that project only (including referenced projects).

Upvotes: 0

Syfer Polski
Syfer Polski

Reputation: 21

Look into the solution explorer - right click the projects you don't want to build and unload them

Upvotes: 2

sbi
sbi

Reputation: 224189

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"

Upvotes: 2

womp
womp

Reputation: 116987

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.

Upvotes: 3

David
David

Reputation: 73604

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

Upvotes: 18

Related Questions