Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010: How to enforce build order of projects in a solution?

I had no problem with this in Visual Studio 2008 but it seems that VS 2010 is having an issue, and I'm betting it's probably me.

I have a solution with an ASP.NET Web Site Project and a few C# projects (BLL, DAL, Tests in NUnit). I have configured the build process for the test project to automatically run NUnit to run the tests. I would like to ensure that the BLL and DAL projects build before the test project so that the tests will run against the latest compiled version (yes, I know I could do this all in one project, but I'm choosing not to -- please bear with me :) )

So, I set the dependencies of the Test project to include the BLL, DAL, and Web Application projects, and the build order shows BLL, DAL, Web Application, and then Tests. However, I noticed that the BLL doesn't actually build when I build the Test project.

Any idea what this could be or any option I might be missing to force the other projects to build when I build the Test project?

Thanks in advance for any help!

like image 520
SeanKilleen Avatar asked Sep 06 '10 19:09

SeanKilleen


People also ask

How do I set 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 in Visual Studio 2015?

You can set your project build order by right click on 'Project Solution' and select “Select Project Build Order” option.

How do I build all projects in Visual Studio?

On the menu bar, choose Build, and then choose either Build ProjectName or Rebuild ProjectName. Choose Build ProjectName to build only those project components that have changed since the most recent build. Choose Rebuild ProjectName to "clean" the project and then build the project files and all project components.


1 Answers

Nick Craver mentioned checking the Configuration Manager to ensure you have the project selected to build for a given configuration.

However, to set the build order for multiple projects in a solution right click the solution and choose "Project Build Order..." from the context menu.

like image 178
M. Travis Volker Avatar answered Oct 09 '22 11:10

M. Travis Volker