TFS 2013 build - 找不到使用Post Build Event复制的文件

时间:2015-07-06 13:52:25

标签: tfs msbuild tfs2013 auto-build

这是一个winform应用程序。 所有dll,exe和一些其他扩展文件都通过post build事件(VS post-build)复制到StartupProject \ bin。

在TFS服务器上,该项目有2个子文件夹:bin和src。(bin包含必需的dll,但其他扩展名缺少-.png,.dat,.xslx)。

在服务器上,后期构建复制的文件显示在StartupProject \ bin下,但它们不会复制到TFSFolder \ bin。 如何强制将所有StartupProj / bin复制到TFSFolder \ bin?

1 个答案:

答案 0 :(得分:0)

Team Build使用Visual Studio构建中的不同目录布局。对于任何构建的项目,所有二进制文件都放在一个文件夹中,因此引用会自动解决,并且很容易将DLL复制到最终的Drop文件夹。

您应该使用$(OutDir) MSBuild变量来正确引用VS和TFS版本中的二进制目录。有关详细信息,请参阅Is there a single MSBuild and TFSBuild variable that will point to where the binaries are?

如果您需要为桌面(VS)和服务器(TFS)版本使用不同的脚本,请使用TFS 2010 Build Automation and post-build event中所述的$(BuildingInsideVisualStudio)变量。