Simpler that this, there is an <uptodate> task in NAnt thae will validate if any of the files in one fileset are newer that those in another fileset and set a property to true if they are.  you can then use this in the "if" attribute in <vbc>/<csc>.

As for the suggestion of including your project files in one master file, this is not trivial.  If like me all your project build scripts have the same structure with multiple targets, you will hit problems importing them as you will have duplicate definitions of the targets.

You could fix this by having separate namespaces for each project file, but then if you put everything in the NAnt namespace by default (to get intellisense in VS) then this will break.

You simplest solution will therefore probably be to use <uptodate>

HTH,

Bill




"Martin Gainty" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

14/11/2005 14:31
Please respond to "Martin Gainty"

       
        To:        "Matt Adamson" <[EMAIL PROTECTED]>
        cc:        <nant-users@lists.sourceforge.net>
        Subject:        [Nant-users] Re: [Nant-users] £100 Cash offered for a resolution to the Issue with large nant project build file re building each inner project



Good Morning Matt
This will execute the tasks in the target ONLY IF the library out.dll is older than 24 hours

<target name="build-module-A"
    if="${
datetime::now() - file::get-last-write-time('out.dll')) > timespan::from-hours(24)}">
...
</target>

Cheers from across the pond,
Martin Gainty

 
(001)617-852-7822
----- Original Message -----

From: Matt Adamson
To: nant-users@lists.sourceforge.net
Sent: Friday, November 11, 2005 6:47 AM
Subject: [Nant-users] £100 Cash offered for a resolution to the Issue with large nant project build file re building each inner project

Guys,
 
I sent this a week ago however I'd like a quick resolution so am offering a £100 cash incentive if you can resolve this for us.
 
Cheers
 
Matt
 
-----------------------------------------------------------------------------------------------------------------------------------------
Guys,

I've sent this issue to Gerry Shaw however he isn't too sure of the problem and suggested I ask for more help from you guys.

 
We have a large build file attached which calls a large number of other build files for about 100 different projects. Were finding that some projects are being re built for every project which references them. I have attached the main build file + another one which is referenced from this.
 
Gerry mentioned the issue could be
 
"The problem is that you are building your components by calling  the <nant> task.  This is effectively running a new  
process of  nant.exe on the build file.  The new process of  nant doesn't know  what assemblies have already been called so  
it will end up  rebuilding them.

Solution, don't use the <nant> task.  Instead include all the files into this single master build file and then <call> the  
task  that was in that build file"

 
However I don't understand how to restructure the file here to do this. Each target is called in another file e.g. the project Tranmit.Common.
 
Any help would be much appreciated.
 
Cheers
 
Matt
 
 
--------------------------------------------------------------------------------------------------------------------------




IMPORTANT
The information contained in this e-mail and any attachments is intended for the addressee only
and may contain legally privileged or confidential information. If you are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take any action in reliance
on the information and Avon Insurance plc will not accept liability for any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or representation as to its
accuracy or reliability. If you are not the addressee, please notify us immediately on 01789 202121*
and delete the material from your computer and destroy any copies.


Avon Insurance plc reserves the right to monitor and record incoming and outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result of any virus being passed on.


Avon Insurance plc (No. 209606).
Registered in England. Registered Office: Arden Street, Stratford upon Avon, Warwickshire CV37 6WA.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British Insurers.


*For security and training purposes, telephone calls may be recorded and monitored.

Reply via email to