Error MSBuild MSB3021 with CruiseControl.Net : Unable to copy file
I have a "Unable to copy file X.DLL" in a MSBuild task on my CruiseControl.Net project.
My CCNet project is like this :
<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>
The build report is as follows :
<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\Rep开发者_运维技巧orting.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>
It works perfectly fine when I launch it from a console on my own computer.
The file it tries to copy (\bin\ Release\KoamaOP.dll) does not exists, but \bin\ Debug\KoamaOP.dll exists. Why does it try to get the Release dll, although I specified /p:Configuration=Debug
?
What can be the root of the problem ?
Thanks
Have you verified that the file D:\wwwroot\CruiseControl\Working\trunk\Reporting\bin\Release\Reporting.dll actually exists on the build box? It may be that the path is incorrect.
The copy is trying to put the file under a "back" folder. Is this a pre-build or post-build step you added to save old versions of files? If so, you might have one of those steps misconfigured.
As to it working on your box - I suspect you already have the Release version of the dll built, so the copy step doesn't fail. If you delete all of the dlls on your box and then rebuild, I suspect you will find the same problem.
精彩评论