我正在使用 TFS2012。我已经创建了一个构建定义来构建每个 checkIn uding VS2012。在我的项目的 Vs2008 中,我使用 XCOPY 创建了一个预构建事件,以将解决方案目录中的一些文件复制到另一个文件夹。但是在我执行 CheckIn Build 之后,由于以下错误而失败
Summary
Debug | Any CPU
1 error(s), 0 warning(s)
$/test/coding_files/cal_reg.sln - 1 error(s), 0 warning(s), View Log File
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets (895): The command "XCOPY "C:\Builds\1\test\New Build Definition 1\Sources\coding_files\*.*" "\\pc97\D\" /E /Y /R /K" exited with code 4.
$/test/coding_files/cal_reg.sln compiled
No Test Results
No Code Coverage Results
Other Errors and Warnings
1 error(s), 0 warning(s)
Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
为什么会发生这种情况?如何在构建之前执行复制命令?