Visual Studio 2013 解决方案构建不按构建顺序 [英] Visual Studio 2013 Solution building not in build order

查看:32
本文介绍了Visual Studio 2013 解决方案构建不按构建顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 C# 解决方案构建Fresh"时遇到问题.如果我清理解决方案并再次构建它,它就不会构建(我可以做几次,它会构建).它有一个关于 azure 项目在它所依赖的 worker 和 web 项目之前构建的错误.还关于解决方案中的大多数项目如何寻找

I am having problems getting my C# Solution to build "Fresh". If I clean the solution and build it again it will not build (I can do it a few times and it will build). It has an error about the azure project getting build before the worker and web projects that it is dependent on. Also about how most of the projects in the solution are looking for

WAT070 : The referenced assembly {...}/Worker.dll was not found. 
Please make sure to build the role project that produces this assembly before building this Windows Azure Cloud Service Project.
{...}VisualStudiov12.0Windows Azure Tools2.2Microsoft.WindowsAzure.targets 1252    5   AzureProjectName

现在,如果我按照 Project Dependencies -> Build Order 中列出的顺序构建项目,一切正常.此外,Web 和工作角色列在 Azure 项目之前.

Now if I build the projects in the order listed in the Project Dependencies -> Build Order everything works. Also, the web and work role are listed before Azure Project.

推荐答案

解决方案很简单.

您可以通过右键单击项目解决方案"并选择选择项目构建顺序"选项来设置项目构建顺序.

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

例如,我有一个 WpfFormApplicaiton1 和两个标题为ClassLibrary1"和ClassLibrary2"的类.默认情况下,Visual Studio 将其设置如下:

For Example, I have a WpfFormApplicaiton1 and two class with title "ClassLibrary1" and "ClassLibrary2". By default Visual Studio sets it as follow:

我的要求是,例如ClassLibrary1"将使用ClassLibrary2"&ClassLibrary1"将由WpfFormApplication1"使用.因此,为了满足此要求,我必须更改默认的项目构建顺序.

My requirement is such as "ClassLibrary2" will be used by "ClassLibrary1" & "ClassLibrary1" will be used by "WpfFormApplication1". So, in order to fulfill this requirement I have to change the default project build order.

转到项目依赖项;选择ClassLibrary1"并将ClassLibrary2"设置为其依赖项.

Go to Project Dependencies; Select the "ClassLibrary1" and set the "ClassLibrary2" as its dependency.

同样,选择WpfFormApplication1"并将ClassLibrary1"设置为其依赖项.

Similary, select the "WpfFormApplication1" and set the "ClassLibrary1" as its dependency.

现在,所需的项目构建顺序已设置;由 Project Build Order 的选项确认.

Now, the desired project build order is set; confirmed by Project Build Order's options.

解决方案来自我的博客.

这篇关于Visual Studio 2013 解决方案构建不按构建顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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