nant - newline in <buildArgs> causes "Target ' ' does not exist in this project." (Bug #12)


Added by Babak Naffas over 5 years ago. Updated almost 5 years ago.


Status:Closed Start date:09/16/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Task Spent time: -
Target version:1.7
Affected version:1.6

Description

I work with two different versions of CCNET, 1.4.4.83 and 1.6.7898.1
In my configuration, I have my <buildArgs> node split in to multiple lines for readability

&lt;tasks&gt;
&lt;nant&gt;
&lt;executable&gt;$(NAntExecutablePath)&lt;/executable&gt;
&lt;buildFile&gt;D:\ci\default.build.xml&lt;/buildFile&gt;
&lt;buildArgs&gt;
-D:SolutionFile="$(Batch_WorkingFolderTrunk)\MySolution.sln"
-D:LocalDeployRoot=D:\ci\deploy\MyProject
&lt;/buildArgs&gt;
&lt;targetList&gt;
&lt;target&gt;build&lt;/target&gt;
&lt;/targetList&gt;
&lt;/nant&gt;
&lt;/tasks&gt;

This works fine in my 1.4.x solution with no issues. In my 1.6.7898.1 installation, I started receiving an error message "Target ' ' does not exist in this project." I was able to fix the error my removing all extra newlines from the <buildArgs> node.

<buildArgs>-D:SolutionFile="$(Batch_WorkingFolderTrunk)\MySolution.sln" -D:LocalDeployRoot=D:\ci\deploy\MyProject</buildArgs>


CCNetConfigWithMultiLinebuildArgs.xml - ccnet config with multiline in nant target (780 Bytes) Ruben Willems, 09/25/2011 11:59 am

CCNetConfigWithMultilineInIncludeFile.xml - ccnet config with multline in nant target via invlude file (444 Bytes) Ruben Willems, 09/25/2011 11:59 am

MultiLineInclude.xml - the include file needed (563 Bytes) Ruben Willems, 09/25/2011 11:59 am

ccnet.log (192.7 kB) Ian Montgomery, 02/28/2012 09:43 am


History

Updated by Ruben Willems over 5 years ago

can not reproduce :-(
attached are the 2 scenario's I've tested (1.6 and 1.7) and both went ok

can someone provide a ccnet.config that shows the error?

Updated by Daniel Nauck over 5 years ago

  • Affected version set to 1.6

Updated by Ian Montgomery about 5 years ago

Hi There

I have the same problem. I have a task that runs a simple console app with a number of parameters. For readability I would place the parameters on individual lines. This worked in the previous version of cruisecontrol but since upgrading to 1.6, I can see new-lines appearing which is throwing the console app off.

<cb:define name="common_deployment_settings">
"$(DeploymentScripts)\MicropayDeploy.xml"
$BASE="c:\dev\Trunk"
$BUILD="$(Build_Config)"
$MP_AUTHORING="Mustang\Authoring"
$MP_SOURCE="Mustang\Source"
</cb:define>
....
....
<exec>
<description>Wrapping Packaged Micropay Application</description>
<executable>C:\Program Files\Wise Installation System\wise32</executable>
<buildArgs>
/d_RELEASE_VER_=$(Version)
/d_EXTRA_VERSION_="$(ExtraVersion)"
/c "$(Mp_WiseScript_location)\MicropayProfessionalSetup_Installer.wse"
</buildArgs>
<buildTimeoutSeconds>2400</buildTimeoutSeconds>
<successExitCodes>0</successExitCodes>
</exec>

If I turn trace on, I can see the newlines appearing in the log.

(log attached).

Updated by Ian Montgomery about 5 years ago

Sorry, <exec> task should have been

<exec>
<description>Deploying 2012 for packaging</description>
<executable>$(SageIrlDeploy)</executable>
<baseDirectory>$(Mp_BaseWiseScript_Path)</baseDirectory>
<buildArgs>
$(common_deployment_settings)
$SOURCE="Source"
$MP_BIN="Deployment\Micropay\Binary Files\Current Year"
E:"Micropay.Client.Build.CleanUp.LastYearOnly"
</buildArgs>
<buildTimeoutSeconds>500</buildTimeoutSeconds>
<successExitCodes>0</successExitCodes>
</exec>

Updated by Ruben Willems almost 5 years ago

I could simulate the problem now :-)
working on a fix

Updated by Ruben Willems almost 5 years ago

fixed the bug

  • Status changed from New to Closed

Also available in: Atom PDF