本文介绍了TFS2010 中 MSBuild OutputPath 和 OutDir 的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个非常大的解决方案(大约 300 多个)项目,我们正在尝试通过 TFS2010 上的 MSBuild 构建它.我们可以在所有开发机器上通过 MSBuild 构建它,并且正在采用 TFS.

We have a very large solution (some 300+) projects and we are trying to build it via MSBuild on TFS2010.We can build it via MSBuild on all out development machines, and are in the process of adopting TFS.

我们的代码结构是这样的:

The structure of our code is like so:

binClient
binServer
FrameworkClientFramework.csproj
ModulesModule1Project1
ModulesModule2Project2
etc.

每个项目都有一个相对的 OutputPath,它将代码构建到 bin 客户端或服务器目录.例如,Project1.csproj 的 OutputPath 为....inClient".

Each project has a relative OutputPath which builds the code to the bin Client or Server directory. So for example, Project1.csproj has an OutputPath of "....inClient".

我们似乎遇到了一个问题,即在 TFS MSBuild 中,OutDir 设置为固定路径:

We seem to be having a problem that in TFS MSBuild the OutDir is set to a Fixed Path:

C:BuildsMyProjectBinaries

因此,当在 OutDir 之上解析相对的 OutputPath 时,事情变得令人困惑

So things are getting confusing when resolving the relative OutputPath on top of the OutDir

  • ClientFramework 转到 C:BuildsMyProjectBinaries..inClient
  • Project1 转到 C:BuildsMyProjectBinaries....inClient
  • 等等

我们还有一些 Post build 事件将一些第 3 方 dll 复制到 bin 文件夹,这些路径也无法正确解析.

We also have some Post build events that copy some 3rd Party dll's to the bin folders, these paths cannot be resolved properly either.

我认为我们寻求的解决方案是将所有内容构建到我们现有的 binClient、binServer 结构中,然后将文件夹从 bin 移动到 Binaries.

I think the solution we are after is to build everything to our existing binClient, binServer structure and then move the Folders from bin to Binaries.

任何关于如何实现这一点或我们应该如何工作的想法都值得赞赏,但更新我们现有的项目可能会出现问题,因为它们都适用于 VS、开发人员命令行构建和 CC.net.

Any ideas on how to accomplish this or how we should be working, are appreciated, but updating our existing projects might prove problematic, as it all works with VS, developer command line builds and with CC.net.

推荐答案

我在 MSDN 上找到了答案:http://msdn.microsoft.com/en-us/library/ff977206.aspx

I found the answer on MSDN : http://msdn.microsoft.com/en-us/library/ff977206.aspx

这篇关于TFS2010 中 MSBuild OutputPath 和 OutDir 的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 23:27