On 4/22/05, Julien Sobrier <[EMAIL PROTECTED]> wrote:
Hello,
can this really work? You have to embed the source files between
<csc></csc>:

<csc target="exe" output="${dir}">
        <sources>
                <include name="AssemblyInfo.cs" />
                <include name="code/*.cs" />
        </sources>
</csc>

I don't see how I can use <csc target="exe" output="..." doc="..."
if="${generateDocs}" />.

Thank you

Julien

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&opclick
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Julien,

Unfortunately the snippet in Gary's email was just demonstrative.  This is why the idiom is "annoyingly verbose" - you will need:
<csc target="exe" output="${dir}" doc="${doc}" if="${generate-docs}">
        <sources>
                <include name="AssemblyInfo.cs" />
                <include name="code/*.cs" />
        </sources>
</csc>
<csc target="exe" output="${dir}" unless="${generate-docs}">
        <sources>
                <include name="AssemblyInfo.cs" />
                <include name="code/*.cs" />
        </sources>
</csc>

Each csc is a copy of the other - the only difference being the presence of the "doc" attribute and the condition under which the task will run.

This is why I was suggesting a new idiom be provided... but I wouldn't expect this to be available in the 0.85 release, so for the time being you will need to use the verbose approach above.

One alternative that is currently (theoretically) viable is to dynamically create the build script from project metadata, to reduce the amount of duplication required in the source scripts.  Unfortunately this is an extremely heavy handed approach.


Regards,

--
Troy

Reply via email to