Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When starting a project for debugging, why does Visual Studio build the whole solution and not just the project?

In Visual Studio, if you select "Start Debugging" or "Start Without Debugging" to run the currently selected startup project, Visual Studio always builds the entire solution. This seems unnecessary, as all it really needs to do is build the project you wish to start, and its dependents.

If you have some unit tests projects for example, you can't run the startup project until all of your unit test projects also compile. At the very least, it is a waste of time building all of these unit test projects as the project one wishes to run will not be dependent on them anyway.

Is it possible to change this behaviour?

like image 788
cbp Avatar asked May 14 '12 03:05

cbp


1 Answers

Yes, you can change this behaviour (and I always do, for the exact reasons you describe).

Go to Tools > Options > Projects and Solutions > Build and Run. then check "Only build startup projects and dependencies on Run".

like image 105
Joe White Avatar answered Nov 04 '22 16:11

Joe White