Build error - The command-line for the "DCC" task is too long

I started having problems with the build yesterday, the trouble started from scratch.
Everything was running smoothly until yesterday.

C: \ Program Files (x86) \ Embarcadero \ Studio \ 15.0 \ Bin \ CodeGear.Delphi.Targets: warning MSB6002: The command-line for the “DCC” task is too long. Command-lines longer than 32,000 characters are Likely to fail. Try reducing the length of the command-line by breaking down the call to “DCC” into multiple calls with Fewer parameters per call.

Has anyone ever experienced this?

I am using MSBuild 12.0 in a Delphi XE7 project.

If you need more information I will send whatever is necessary.

Thanks

Hi Robson,

According to this blog article, the issue is caused by having too many references with long paths in you project. Have you added more references or changed paths recently? Delphi targets are set up for MSBuild 3.5, so it may be worth changing the action to build using MSBuild.35 or changing the Tools version to 3.5. See this blog post for more information on setting up Continua to build Deplhi projects.





I understand. I created a new project to test without reference to any external references and occurred the same mistake.

Recently I activated the property “Use MSBuild externally to compile”. But when I realized suddenly fails, I disabled this option. I believe that the error is related to this fact.

I’ve narrowed the library path using references like $(path). The problem persists.

The error is not the ContinuaCI because he was working properly and had not yet updated.

Thanks.

I put the ContinuaCI to run the build in diagnostic mode and realized that the same library paths are being included 4 times in the build command.

Somewhere it is adding these duplicate paths.

For us to even begin to help you would need to show us what settings you are using on the configuration and the actions. The simplest way to so this is go to the event log (http://yourserver/administration/events) and click on the link at the top for the diagnostics report. That will generate a zip file with a report of all the settings (passwords are not shown in the report). Send the zip file to support@finalbuilder.com, that will enable us to try and replicate what is happening.

Hi Vincent,

I send the email with the request information to support@finalbuilder.com.

Thanks for the support.

I already was sure the problem was not the ContinuaCI. I solved the problem, I removed all dependencies of the Library Path, changed directories to the C:\ and reinstalled. Done! It is now running again.

Hi,
I have the same problem. I added entrys to my LibraryPath. After this everytime when i try to build a project i get the error ’ warning MSB6002: The command-line for the “DCC” task is too long’. I checked the lenght of my LibraryPath and it only around 5400 chars long.
I created a new configuration with MsBuild 3.5 (before I used MsBuild 14), but no change.

What is my error or what can i check to solve this problem?

This is a problem with delphi, you need to somehow shorten your library path. Some third party libraries are particularly bad with this, requiring you to add many paths to library path.

I think you should call MSBUILD directly. I never had any problems with the length of the arguments and I have a length Include property

The commandline too long issue is not a Continua CI issue, it’s an issue with MSBuild, or the delphi msbuild task, or (possibly) a problem with the windows command line length limitation. We don’t set the DCC command line in MSBuild, that’s built into the delphi msbuild task.

How should he call msbuild directly in a continuous integration environment?