From: Hearn, B. <bhearn@SiliconEnergy.com> - 2003-02-25 17:35:20
|
Ian, This is closer to what I need. I had a quick look around in the user documentation, but could not find this tag. Is this a feature of file sets in general? This does break the build properly in the 0.08 release, but unfortunately CSC goes ahead and generates a DLL nonetheless. That causes the subsequent incremental builds to succeed. So this error will not be caught in an incremental build server more than once. Too bad, but once is better than nothing. thanks, Bruce -----Original Message----- From: Ian MacLean [mailto:ianm@ActiveState.com] Sent: Monday, February 24, 2003 5:27 PM To: Hearn, Bruce Cc: nan...@li... Subject: Re: [Nant-users] missing source file does not break the build 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 > Nan...@li... > https://lists.sourceforge.net/lists/listinfo/nant-users |