Yes, these are both bugs and I have already fixed the comment one in an
unrelated change. I will also make sure the error propagates to the top as
it should.

Sorry for the problems this caused. Thanks for reporting them.

This code will be available in tonight's build.

----- Original Message ----- 
From: "Nick Varacalli" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 20, 2003 5:35 PM
Subject: [Nant-users] <if> Questions


> I'm running nant 0.83 final against .Net framework v1.1.
>
> The following portion of my build file produces the output below it.
(Before
> anyone reminds me, yes, I know there is an NDoc  task, I just wanted to
get
> up and running quickly).
>
> 1) Is it possible to get rid of the warnings about comments in <if> tasks?
> [if]  Failed to created task for '#comment' xml element for
> reason:...
>
> 2) Why doesn't the failure of the exec task cause the build to fail? I
> mistakenly used the program name as a variable instead of the variable
name:
> i.e. <exec program="${C:\Program
> Files\NDoc\bin\.net-1.1\NDocConsole.exe}">...
>    I would have expected this to fail with a variable not defined message.
> Instead:
>        [if]  Failed to created task for 'exec' xml element for reason:...
>
> 3) I also seem to remember that the <foreach> task complains about comment
> tasks.
>
> Nick Varacalli
>
> ---build snippet:start---
> <available type="File"
> resource="${nant.project.name}${global.suffix.ndoc.project}"
> property="ndoc.project.exists" />
> <if propertytrue="ndoc.project.exists">
> <!-- Copy to the bin directory -->
> <copy todir="${global.directory.relative.output}"
> overwrite="true">
> <fileset basedir="${arg.build.directory}">
> <includes name="*" />
> </fileset>
> </copy>
>
> <!-- Run NDoc, putting the output in the output
> directory, not the bin directory. -->
> <exec
> program="${C:\Program
> Files\NDoc\bin\.net-1.1\NDocConsole.exe}"
> >
> <arg
> value="-project=${nant.project.name}${global.suffix.ndoc.project}" />
> <arg value="-verbose"
> if="${global.build.verbose}" />
> </exec>
>
> <!-- Copy the output to the build output directory
> -->
> <copy todir="${arg.build.directory}">
> <fileset basedir="${global.directory.ndoc}">
> <includes name="*" />
> </fileset>
> </copy>
>
> <!-- Clean up after ourselves. -->
> <delete>
> <fileset>
> <includes name="bin/*.dll" />
> <includes name="bin/*.pdb" />
> <includes name="bin/*.exe" />
> <includes name="bin/*.xml" />
> <includes name="bin/*.html" />
> </fileset>
> </delete>
> </if>
> ---build snippet:end---
>
> ---output: start---
>        [if]  Failed to created task for '#comment' xml element for reason:
>
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(198
> ,8):
>  Unknown task <#comment>.:
> NAnt.Core.BuildException:
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(198
> ,8):
>  Unknown task <#comment>.
>    at NAnt.Core.TypeFactory.CreateTask(XmlNode taskNode, Project proj)
>    at NAnt.Core.TaskContainer.CreateChildTask(XmlNode node)
>      [copy] Copying 4 files to
> C:\_Playpens\Root\trunk\development\utilities\Library\bin.
>        [if]  Failed to created task for '#comment' xml element for reason:
>
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(205
> ,8):
>  Unknown task <#comment>.:
> NAnt.Core.BuildException:
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(205
> ,8):
>  Unknown task <#comment>.
>    at NAnt.Core.TypeFactory.CreateTask(XmlNode taskNode, Project proj)
>    at NAnt.Core.TaskContainer.CreateChildTask(XmlNode node)
>        [if]  Failed to created task for 'exec' xml element for reason:
>
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(206
> ,5):
>  Property 'C:\Program Files\NDoc\bin\.net-1.1\NDocConsole.exe' has not
been
> set!:
> NAnt.Core.BuildException:
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(206
> ,5):
>  Property 'C:\Program Files\NDoc\bin\.net-1.1\NDocConsole.exe' has not
been
> set!
>    at NAnt.Core.PropertyDictionary.ExpandProperties(String input, Location
> location)
>    at NAnt.Core.Element.InitializeXml(XmlNode elementNode)
>    at NAnt.Core.Element.Initialize(XmlNode elementNode)
>    at NAnt.Core.TaskContainer.CreateChildTask(XmlNode node)
>        [if]  Failed to created task for '#comment' xml element for reason:
>
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(213
> ,8):
>  Unknown task <#comment>.:
> NAnt.Core.BuildException:
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(213
> ,8):
>  Unknown task <#comment>.
>    at NAnt.Core.TypeFactory.CreateTask(XmlNode taskNode, Project proj)
>    at NAnt.Core.TaskContainer.CreateChildTask(XmlNode node)
>        [if]  Failed to created task for '#comment' xml element for reason:
>
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(220
> ,8):
>  Unknown task <#comment>.:
> NAnt.Core.BuildException:
>
C:\_Playpens\Root\trunk\development\tools\nant\master-standard.build.xml(220
> ,8):
>  Unknown task <#comment>.
>    at NAnt.Core.TypeFactory.CreateTask(XmlNode taskNode, Project proj)
>    at NAnt.Core.TaskContainer.CreateChildTask(XmlNode node)
>    [delete] Deleting 4 files.
> Total time: 7 seconds.
> ---output: end---
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to