Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Project Build Order in Visual Studio 2010?

We have a Visual Studio 2010 solution that has over 120 projects that reference each other in some way. All inter-project references are project references and not file references which helps Visual Studio determine the project build order automagically. Out of 120, we have a few core projects that are not interdependant on each other and these projects are referenced by the rest extensively. Hence these projects are at the top of the project build order. These core projects have references from the .NET framework, Enterprise Library (and some of them have third party dll file references like a zip utility).

I cannot figure out why these core projects are ordered in a specific way. What is the algorithm for the project build order for non-interdependant projects?

PS: I do understand I can influence this order by creating a fake dependancy using the Dependencies tab of Project Dependencies.

like image 864
Kash Avatar asked Nov 08 '11 16:11

Kash


People also ask

How do I find the build order in Visual Studio?

In order to set the Build order for your Solution, right-click on the Solution in Solution Explorer and Select Project Build Order: Your Project Dependencies should be set correctly which is used to determine the Build order by Visual Studio.

How do I change the build order on a project?

When you click Project > Optimize EGL Project Build Order, EGL attempts to move projects that are involved in cycles to a more optimal spot in the build order. You can manually change the build order through the workspace preferences (Window > Preferences > General > Workspace > Build Order).

How do I change the project build order in Visual Studio?

Just right click the Solution node and select "Project Build Order".


1 Answers

I believe that Visual Studio builds these projects in the order they appears in solution. If you need to adjust the build order of projects you can use Project Dependencies (do not confuse with .NET References). When you add .NET reference from one .NET project to another inside you Visual Studio solution the Visual Studio automatically creates project dependency. To modify project dependencies manually do the following:

  1. Right-click on the solution in Solution Explorer.
  2. Select Project Dependencies
  3. From the drop-down list select project you want to add dependencies to.
  4. Select dependencies for this project.

Also you can view the resulting build order by switching to the tab Build Order.

like image 99
vharavy Avatar answered Oct 29 '22 14:10

vharavy