错误MSBuild MSB3021与CruiseControl.Net:无法复制文件

时间:2011-09-21 14:20:20

标签: msbuild cruisecontrol.net

我在CruiseControl.Net项目的MSBuild任务中有一个“无法复制文件X.DLL”。

我的CCNet项目是这样的:

<project name="Trunk" queue="Back" queuePriority="1">
    <tasks>
        <msbuild>
            <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
            <workingDirectory>D:\wwwroot\CruiseControl\Working\trunk</workingDirectory>
            <projectFile>kop.sln</projectFile>
            <buildArgs>/noconsolelogger /v:quiet /p:Configuration=Debug</buildArgs>
            <targets>ReBuild</targets>
            <timeout>600</timeout>
        </msbuild>
    </tasks>
</project>

构建报告如下:

<msbuild startTime="09/21/2011 15:56:11" elapsedTime="00:00:32" elapsedSeconds="32" success="false">
  <warning line="0" column="0" timeStamp="09/21/2011 15:56:12"><![CDATA[MSB3021 : Impossible de copier le fichier "D:\wwwroot\CruiseControl\Working\trunk\Reporting\bin\Release\Reporting.dll" vers "back\\Bin\Reporting.dll". Impossible de trouver une partie du chemin d'accès 'D:\wwwroot\CruiseControl\Working\trunk\Reporting\bin\Release\Reporting.dll'.]]></warning>
  <warning line="0" column="0" timeStamp="09/21/2011 15:56:12"><![CDATA[MSB3021 : Impossible de copier le fichier "D:\wwwroot\CruiseControl\Working\trunk\KoamaOP\bin\Release\KoamaOP.dll" vers "back\\Bin\KoamaOP.dll". Impossible de trouver une partie du chemin d'accès 'D:\wwwroot\CruiseControl\Working\trunk\KoamaOP\bin\Release\KoamaOP.dll'.]]></warning>

当我从我自己的计算机上的控制台启动它时,它完全正常。

它尝试复制的文件(\ bin \ 发布 \ KoamaOP.dll)不存在,但\ bin \ 调试 \ KoamaOP.dll存在。尽管我指定了/p:Configuration=Debug

,为什么它会尝试获取Release dll

问题的根源是什么?

由于

1 个答案:

答案 0 :(得分:0)

您是否验证过生成框中是否存在文件D:\ wwwroot \ CruiseControl \ Working \ trunk \ Reporting \ bin \ Release \ Reporting.dll?可能是路径不正确。

副本正在尝试将文件放在“后退”文件夹下。这是您为保存旧版本文件而添加的预构建或构建后步骤吗?如果是这样,您可能会错误配置其中一个步骤。

至于它在你的盒子上工作 - 我怀疑你已经建立了dll的发行版本,所以复制步骤不会失败。如果你删除盒子上的所有dll然后重建,我怀疑你会发现同样的问题。