Ok, thanks to everyone for their help. Here is the final Execute
method for the task that actually works:
protected override void ExecuteTask()
{
FileSet fileset = Project.DataTypeReferences
[_filesetName] as FileSet;
if (fileset != null)
{
string[] sortedFileNames = new string
[fileset.FileNames.Count];
fileset.FileNames.CopyTo(sortedFileNames, 0);
Array.Sort(sortedFileNames, new DeltaFileComparer());
FileSet sortedFileSet = new FileSet();
FileSet.Include[] includeFiles = new FileSet.Include
[sortedFileNames.Length];
for (int i = 0; i < includeFiles.Length; i++)
{
FileSet.Include includeFile = new FileSet.Include
();
includeFile.AsIs = true;
includeFile.Pattern = sortedFileNames[i];
includeFiles[i] = includeFile;
}
sortedFileSet.IncludeElements = includeFiles;
Project.DataTypeReferences[_filesetName] =
sortedFileSet;
}
}
Again, thanks to everyone for the pointers.
Griffin
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users