1
votes

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\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>

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

1
Debug is the default project build configuration, so even if you removed the property from the build line, it would still target debug. The problem is elsewhere.Ritch Melton
PS - It's odd that you are specifying a quiet verbosity when 'verbose' would go into your logs and help you troubleshoot the issue.Ritch Melton
Well, that's a good remark. I'm gonna try it again with verbosity.thomasb
More verbosity does not seems to add anything to the log file. I just removed /v:quiet, is there something else to do ?thomasb
The available verbosity levels are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. /v is also acceptable.Ritch Melton

1 Answers

0
votes

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.