Bruce,
By default the fileset element only includes files that exist. That is to support wildcard matching. So if you had <includes name = "*.cs"/> class1.cs wouldn't match either. However to get the result you're after use the asis attribute. so:


  <sources>
       <includes name="class1.cs" asis="true" />
       <includes name="class2.cs" />
    </sources>

will pass class1.cs thru to the compiler without checking for existence first.

Ian
when NANT contains a csc project with the following lines:

<csc ...>
...
   <sources>
      <includes name="class1.cs" />
      <includes name="class2.cs" />
   </sources>
</csc>

If the file class1.cs file is not present on disk, no error message is
generated.  The project will compile with only class2.cs.  The absence of
class1 will only be noticed when another project that references class1 is
built - and fails.

This can easily happen if someone forgets to check a new file into source
control.  It seems to me that NANT should break the build when this happens,
rather than try to compile whatever files are present.  This would make it
much easier to find such problems where they occur.

Is there a way to force NANT to break the CSC task when a source file is
missing?

thanks,

Bruce


------------------------------------------------------- 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