我正在使用TFS2012.I已創建構建定義以構建每個checkIn uding VS2012。在VS2008的項目中,我創建了一個XCOPY預生成事件,從解決方案目錄中的一些文件複製到另一個folder.But後,我做的CheckIn構建與以下錯誤命令「XCOPY」在編譯時使用新的版本定義退出時出現代碼4錯誤
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)
爲什麼會發生故障?是什麼在構建之前要執行復制命令?
有你找到了解決這個問題的辦法?您可以粘貼您在預生成事件中輸入的確切XCOPY命令。 – Arafat 2014-03-31 16:55:28