CruiseControl.Net中的构建后事件失败

时间:2016-05-20 21:03:41

标签: c# cruisecontrol.net post-build-event

在Visual Studio 2012中使用CC.net.CC.Net构建一个带有后期构建事件的C#项目:

copy "$(SolutionDir)Instruments\$(OutDir)*.*" "$(TargetDir)" /d

在Visual Studio中取得成功。它在CC.Net中失败了。这是错误代码:

  

命令"复制" .. \ .. \ Instruments \ bin \ Release \ *。*" " W:\ Checkout \ TeraSoft 1.0 \ Terasoft \ Terasoft \ bin \ Release \" / d"退出代码1. [W:\ Checkout \ TeraSoft 1.0 \ Terasoft \ Terasoft \ Terasoft.csproj]

documentation表示错误代码1表示"未找到任何文件要复制。"但是.. \ .. \ Instruments \ bin \ Release中有很多文件。我读到错误代码1也可能意味着它无法找到目录,但如果Visual Studio可以,那么为什么不CC.Net?

如果没有构建后事件,CC.Net会成功构建项目。关于可能导致它的原因的任何想法?

1 个答案:

答案 0 :(得分:0)

请记住,Cruise Control服务以不同的用户身份运行。它可能是"本地系统"或网络服务。 我猜测W:没有为该用户映射。如果不是,那么用户可能没有该文件夹的权限。

我也看到了命令"copy "..\..\Instruments\bin\Release*.*"  在"*.*"

之前缺少反斜杠