使用msbuild从VS 2008到2010升级时构建顺序和依赖关系 [英] Build order and dependencies not preserved on upgrade from VS 2008 to 2010 with msbuild

查看:173
本文介绍了使用msbuild从VS 2008到2010升级时构建顺序和依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在升级VS 2008解决方案以在VS 2010上运行

我成功地在VS 2010中构建了

I'm in the process of upgrading our VS 2008 solution to run on VS 2010
I managed to successfully build in VS 2010

我现在的下一步是配置运行TFS 2008的构建机器

每当我开始构建它,它会按照字母顺序执行我的项目,而不考虑依赖关系。我已经搜索了很多,我似乎找不到一个解决方案。

My next step now is to configure a build machine running TFS 2008
Whenever I start a build it does my projects in alphabetical order with no regard for dependencies. I've googled a lot and I can't seem to find a solution to this.

我的问题最接近的解决方案在这里找到: msdn链接链接到这个:<一个href =http://victorsergienko.com/project-dependencies-of-visual-studio-2008-broken-in-msbuild/ =nofollow noreferrer>依赖解决方案

The closest solution to my problem is found here: msdn link which links to this: dependency solution

然而,我正在处理 129 项目,所以我会真的,而不是在xml中手动完成。

有没有人能够以msbuild识别的方式有效地重映射依赖关系,而不用操纵xml几天?

However I'm dealing with 129 projects, so I would really rather not do this all manually in the xml.
Has anyone been able to effectively remap the dependencies in a way which msbuild recognizes without manipulating the xml for days...?

推荐答案

事实证明,转换到VS 2010使构建代理必须使用.NET 4.0版本的msbuild。

所以我按照这里概述的步骤,它的工作原理是:构建.NET 4.0应用程序Team Build 2008 请记住,这些指示是在测试版期间写的,路径现在是v4.0.30319。

即使我的所有项目都是针对3.5

It turns out that the conversion to VS 2010 makes the build agent have to use the .NET 4.0 version of msbuild.
So I followed the steps outlined here and it worked: Building .NET 4.0 Applications Using Team Build 2008. Keep in mind that those instructions were written during the beta and the path is now v4.0.30319.
This was required even though all my projects are targeting 3.5

基本上我不得不改变一行,现在一切都很开心(仍在努力让我的构建通过,但顺序是好的)。它与依赖关系没有保留无关,只是依赖关系的方式被管理不了msbuild 3.5

Basically I had to make a one line change and now everything is happy (still working on getting my build to pass but the order is good). It had nothing to do with dependencies not being preserved, simply that the way dependencies were being managed wasn't understood by msbuild 3.5

这篇关于使用msbuild从VS 2008到2010升级时构建顺序和依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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