构建后事件无法与msbuild

时间:2017-05-26 18:50:56

标签: visual-studio-2013 msbuild

我有一个引用多个项目的解决方案。在其中一个引用的项目中,我添加了以下事后(将其复制到解决方案输出中)。

xcopy /y "$(TargetName).*" "$(SolutionDir)UIBackendSSRSReports\$(OutDir)"

这在从Visual Studio编译时非常有效,但是从msbuild运行时它会失败(退出代码4 )。

似乎在使用msbuild时,OutDir(以及其他宏)的值是不同的。

ex:$(OutDir)

In VS = D:\Workspace-ET\source_SSRSBackEnd\Common\BackEnd Automation\BackEndSSRSReports\UIBackendSSRSReports\bin\Debug
In msbuild =  " D:\B\1\Src_PMC-QA-Automation\BackEndSSRSReports_ssrsBranch\bin\

不确定为什么他们如此不同,有什么想法?我们使用buildAgent和buildController TFS设置构建

0 个答案:

没有答案