I don't know if this solves your issue, but try using a simple <copy> task
for your *.aspx files.
It has a nice property of copying only files that are newer than the
destination files.

See $NANT/doc/help/tasks/copytask.html for an example.

You should have another task that would compile all *.aspx.cs files to a
single dll and copy it to "bin" directory whenever it's changed. Again,
<csc> task is smart enough not to recompile the output unless one of the
source files have changed.

See $NANT/doc/help/tasks/csctask.html for an example.

Here's the outline of the solution. It assumes that source files (*.aspx and
*.aspx.cs) are in "src" directory and they get compiled and copied to "www"
directory.

Hope it helps,

Jarek

--------------8<---------------------CUT HERE--------------
<?xml version="1.0" ?>
<project name="sample" default="build">

 <property name="web_publish_directory" value="www" />

 <target name="build">
  <call target="compile" />
  <call target="deployaspx" />
 </target>

 <target name="compile">
  <csc target="library"
output="${web_publish_directory}/bin/codebehind.dll">
   <sources basedir="src">
    <includes name="*.aspx.cs" />
   </sources>
  </csc>
 </target>

 <target name="deployaspx">
  <copy todir="${web_publish_directory}">
   <fileset basedir="src">
    <includes name="*.aspx" />
   </fileset>
  </copy>
 </target>
</project>
--------------8<---------------------CUT HERE--------------

----- Original Message ----- 
From: "Philo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 27, 2003 4:55 PM
Subject: [Nant-users] Copy aspx files when changed?


>
> I have a designer that is often tweaking the layout on our aspx files,
> but doesn't touch the code-behind. I would like to have an automated
> process to check out changed files and copy them to the distribution
> directory, but not recompile. I think I'm figuring out how to build
> the target to do this, but I'm not sure how to get NAnt to trigger
> that just aspx files have changed - where should I be looking?
>
>
> -- 
> Best regards,
>  Philo                          mailto:[EMAIL PROTECTED]
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to