Title: Message
All,
 
I've included an <if> here that is using the deprecated uptodatefile.  NAnt warns that the attribute is deprecated and to use the ${file::uptodate(comparefile, uptodatefile)} function.
 
In this code below, it will set the ${build.required} property to false if all files are up to date.  Is there an easy (and clean) way to accomplish this using the file::uptodate() function?
 
<if uptodatefile=".\${{assembly.name}}.version" debug="true" verbose="true" failonerror="false">
    <comparefiles>
     <!-- References -->
     <xsl:for-each select="./References/Reference">
      <xsl:choose>
       <xsl:when test="substring(@AssemblyName,1,6) = 'System'"> <!-- static assembly reference -->
        <includes name="[EMAIL PROTECTED]" />
       </xsl:when>
       <!--Static References-->
       <xsl:when test="@AssemblyName">
        <!--We need to resolve this better.  We haven't copied these into the latest dir yet.
        <includes name="[EMAIL PROTECTED]" />-->
       </xsl:when>
       <!-- Project references -->
       <xsl:when test="@Project">
        <!-- It is currently assumed that assembly names and root folder names are equal.-->
        <includes name="[EMAIL PROTECTED]@Name}.version" />
       </xsl:when>
       <!-- COM object reference -->
       <xsl:when test="@Guid">
        <!-- This path doesn't exist yet
        <includes name="[EMAIL PROTECTED]" />
        -->
       </xsl:when>
      </xsl:choose>
     </xsl:for-each>
     
     <!--Code and Embedded Resources-->
     <xsl:for-each select="../Files/Include/[EMAIL PROTECTED]'Compile' or @BuildAction='EmbeddedResource' or @BuildAction='Content']">
      <includes name="[EMAIL PROTECTED]" />
     </xsl:for-each>
     
     <!-- The project file may have changed -->
     <includes name="${{project.path}}" />
     
     <!-- The force.rebuild file allows us to force a rebuild even if there isn't a need to -->
     <includes name="${{project.src}}\force.rebuild" />
    </comparefiles>
    
    <property name="build.required" value="false" />
   </if>
 
Thanks,

Evan A. Bonnett
Reynolds and Reynolds, IT
ERA Integrated Desking Development
937-485-8577
58577

Reply via email to