Visual Studio 2010:如何在解决方案中强制执行项目的构建顺序? [英] Visual Studio 2010: How to enforce build order of projects in a solution?

查看:25
本文介绍了Visual Studio 2010:如何在解决方案中强制执行项目的构建顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio 2008 中没有遇到这个问题,但似乎 VS 2010 有问题,我敢打赌这可能是我.

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.

我有一个包含 ASP.NET 网站项目和一些 C# 项目(BLL、DAL、NUnit 中的测试)的解决方案.我已经将测试项目的构建过程配置为自动运行 NUnit 来运行测试.我想确保 BLL 和 DAL 项目在测试项目之前构建,以便测试将针对最新的编译版本运行(是的,我知道我可以在一个项目中完成这一切,但我选择不——请多多包涵 :) )

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 :) )

因此,我将Test项目的依赖项设置为包括BLL、DAL和Web Application项目,构建顺序显示BLL、DAL、Web Application,然后是Tests.但是,我注意到在构建 Test 项目时实际上并未构建 BLL.

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?

在此先感谢您的帮助!

推荐答案

Nick Craver 提到检查配置管理器以确保您选择了为给定配置构建的项目.

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.

这篇关于Visual Studio 2010:如何在解决方案中强制执行项目的构建顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆