? a.diff
? log.txt
? mono.diff
? monopush.bat
? nant.diff
? runtests.cs
? update.bat
? doc/bin
? doc/doc.csproj
? doc/doc.csproj.user
? doc/doc.sln
? doc/doc.suo
? doc/obj
? src/NAnt.Core/error.build
? src/NAnt.Core/log.txt
? tests/NAnt.Core/log.txt
? tests/NAnt.Core/testme.bat
Index: src/CommonAssemblyInfo.cs
===================================================================
RCS file: /cvsroot/nant/nant/src/CommonAssemblyInfo.cs,v
retrieving revision 1.9
diff -u -r1.9 CommonAssemblyInfo.cs
--- src/CommonAssemblyInfo.cs	18 Dec 2003 18:18:29 -0000	1.9
+++ src/CommonAssemblyInfo.cs	3 Jan 2004 15:50:28 -0000
@@ -34,7 +34,7 @@
 [assembly: AssemblyConfiguration("net-1.0.win32; nightly")]
 [assembly: AssemblyCompany("http://nant.sourceforge.net")]
 [assembly: AssemblyProduct("NAnt")]
-[assembly: AssemblyCopyright("Copyright (C) 2001-2003 Gerry Shaw")]
+[assembly: AssemblyCopyright("Copyright (C) 2001-2004 Gerry Shaw")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
Index: src/NAnt.Core/PlatformHelper.cs
===================================================================
RCS file: src/NAnt.Core/PlatformHelper.cs
diff -N src/NAnt.Core/PlatformHelper.cs
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/NAnt.Core/PlatformHelper.cs	3 Jan 2004 15:50:28 -0000
@@ -0,0 +1,105 @@
+// NAnt - A .NET build tool
+// Copyright (C) 2001-2003 Gerry Shaw
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+// Jaroslaw Kowalski (jkowalski@users.sourceforge.net)
+
+using System;
+using System.Collections.Specialized;
+using System.IO;
+using System.Runtime.InteropServices;
+
+using System.Text;
+
+namespace NAnt.Core {
+    [Serializable()]
+    internal class PlatformHelper {
+        public static readonly bool IsMono;
+        public static readonly bool IsWindows;
+        public static readonly bool IsUnix;
+        public static readonly bool PInvokeOK;
+        
+        static PlatformHelper() {
+            //
+            // check a class in mscorlib to determine if we're running on Mono
+            // 
+            if (Type.GetType("Mono.Runtime", false) != null) {
+                // we're on Mono
+                IsMono = true;
+            } else {
+                IsMono = false;
+            }
+            
+            PlatformID platformID = System.Environment.OSVersion.Platform;
+
+            if ((platformID == PlatformID.Win32NT) || (platformID == PlatformID.Win32Windows)) {
+                IsWindows = true;
+            } else {
+                IsWindows = false;
+            }
+
+            if (IsMono && (int)platformID == 128) {
+                IsUnix = true;
+            }
+
+            if (IsWindows && !IsMono) {
+                PInvokeOK = true;
+            } else {
+                PInvokeOK = false;
+            }
+        }
+
+        public static bool IsVolumeCaseSensitive(string path) {
+            PlatformID platformID = System.Environment.OSVersion.Platform;
+            
+            if (PInvokeOK) {
+                StringBuilder VolLabel = new StringBuilder(256);    // Label
+                UInt32 VolFlags = new UInt32();
+                StringBuilder FSName = new StringBuilder(256);  // File System Name
+                UInt32 SerNum = 0;
+                UInt32 MaxCompLen = 0;
+
+                long Ret = PInvokeHelper.GetVolumeInformationWrapper(path, 
+                        VolLabel, 
+                        (UInt32)VolLabel.Capacity, 
+                        ref SerNum, 
+                        ref MaxCompLen, 
+                        ref VolFlags, 
+                        FSName, 
+                        (UInt32)FSName.Capacity);
+
+                return (((VolumeFlags) VolFlags) & VolumeFlags.CaseSensitive) == VolumeFlags.CaseSensitive;
+            }
+
+            if (IsUnix) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+        
+        class PInvokeHelper
+        {
+            [DllImport("kernel32.dll")]
+            private static extern long GetVolumeInformation(string PathName, StringBuilder VolumeNameBuffer, UInt32 VolumeNameSize, ref UInt32 VolumeSerialNumber, ref UInt32 MaximumComponentLength, ref UInt32 FileSystemFlags, StringBuilder FileSystemNameBuffer, UInt32 FileSystemNameSize);
+
+            public static long GetVolumeInformationWrapper(string PathName, StringBuilder VolumeNameBuffer, UInt32 VolumeNameSize, ref UInt32 VolumeSerialNumber, ref UInt32 MaximumComponentLength, ref UInt32 FileSystemFlags, StringBuilder FileSystemNameBuffer, UInt32 FileSystemNameSize)
+            {
+                return GetVolumeInformation(PathName, VolumeNameBuffer, VolumeNameSize, ref VolumeSerialNumber, ref MaximumComponentLength, ref FileSystemFlags, FileSystemNameBuffer, FileSystemNameSize);
+            }
+        }
+    }
+}
Index: src/NAnt.Core/TypeFactory.cs
===================================================================
RCS file: /cvsroot/nant/nant/src/NAnt.Core/TypeFactory.cs,v
retrieving revision 1.5
diff -u -r1.5 TypeFactory.cs
--- src/NAnt.Core/TypeFactory.cs	28 Dec 2003 14:54:57 -0000	1.5
+++ src/NAnt.Core/TypeFactory.cs	3 Jan 2004 15:50:28 -0000
@@ -92,12 +92,20 @@
             scanner.Includes.Add("*Test.dll");
 
             foreach (string assemblyFile in scanner.FileNames) {
-                logger.Info(string.Format(CultureInfo.InvariantCulture, 
-                    "Scanning assembly '{0}' for tasks, types and functions.", assemblyFile));
+                try {
+                    logger.Info(string.Format(CultureInfo.InvariantCulture, 
+                                "Scanning assembly '{0}' for tasks, types and functions.", assemblyFile));
 
-                AddTasks(Assembly.LoadFrom(assemblyFile));
-                AddDataTypes(Assembly.LoadFrom(assemblyFile));
-                AddFunctionSets(Assembly.LoadFrom(assemblyFile));
+                    Assembly asm = Assembly.LoadFrom(assemblyFile);
+
+                    AddTasks(asm);
+                    AddDataTypes(asm);
+                    AddFunctionSets(asm);
+                }
+                catch (Exception ex) {
+                    logger.Error(string.Format(CultureInfo.InvariantCulture, 
+                                "Cannot load '{0}' for tasks, types and functions.", assemblyFile), ex);
+                }
             }
         }
 
Index: src/NAnt.Core/VolumeInfo.cs
===================================================================
RCS file: /cvsroot/nant/nant/src/NAnt.Core/VolumeInfo.cs,v
retrieving revision 1.15
diff -u -r1.15 VolumeInfo.cs
--- src/NAnt.Core/VolumeInfo.cs	31 Aug 2003 11:29:51 -0000	1.15
+++ src/NAnt.Core/VolumeInfo.cs	3 Jan 2004 15:50:29 -0000
@@ -181,44 +181,12 @@
         public static bool IsVolumeCaseSensitive(Uri uri) {
             ValidateURI(uri);
 
-            bool isCaseSensitive = true;
-            PlatformID platformID = System.Environment.OSVersion.Platform;
-            
-            if ((platformID == PlatformID.Win32NT) ||
-                (platformID == PlatformID.Win32Windows) ) {
-
-                //We're on some version of Windows, so the PInvoke is OK. Unless we're on mono in which case assume false
-#if (!MONO)
-                // Declare Receiving Variables
-                StringBuilder VolLabel = new StringBuilder(256);    // Label
-                UInt32 VolFlags = new UInt32();
-                StringBuilder FSName = new StringBuilder(256);  // File System Name
-                UInt32 SerNum = 0;
-                UInt32 MaxCompLen = 0;
-
-                // Attempt to retreive the information
-                long Ret = GetVolumeInformation(uri.LocalPath, VolLabel, (UInt32)VolLabel.Capacity, ref SerNum, ref MaxCompLen, ref VolFlags, FSName, (UInt32) FSName.Capacity);
-
-                isCaseSensitive = (((VolumeFlags) VolFlags) & VolumeFlags.CaseSensitive) == VolumeFlags.CaseSensitive;
-#endif
-            }
-            else if ((int) platformID == 128) {
-                // Mono uses Platform id = 128 for Unix
-                isCaseSensitive = true;
-
-                //TODO - figure out what Rotor uses for non-Windows platforms
-            }
-            return isCaseSensitive;
+            return PlatformHelper.IsVolumeCaseSensitive(uri.LocalPath);
         }
 
         #endregion Public Static Methods
 
         #region Private Static Methods
-
-#if (!MONO)
-        [DllImport("kernel32.dll")]
-        private static extern long GetVolumeInformation(string PathName, StringBuilder VolumeNameBuffer, UInt32 VolumeNameSize, ref UInt32 VolumeSerialNumber, ref UInt32 MaximumComponentLength, ref UInt32 FileSystemFlags, StringBuilder FileSystemNameBuffer, UInt32 FileSystemNameSize);
-#endif
 
         private static void ValidateURI(Uri uri) {
             // Make sure we were passed something
Index: src/NAnt.Core/Tasks/ExternalProgramBase.cs
===================================================================
RCS file: /cvsroot/nant/nant/src/NAnt.Core/Tasks/ExternalProgramBase.cs,v
retrieving revision 1.49
diff -u -r1.49 ExternalProgramBase.cs
--- src/NAnt.Core/Tasks/ExternalProgramBase.cs	28 Dec 2003 15:44:39 -0000	1.49
+++ src/NAnt.Core/Tasks/ExternalProgramBase.cs	3 Jan 2004 15:50:29 -0000
@@ -44,14 +44,21 @@
         private ArgumentCollection _arguments = new ArgumentCollection();
         private bool _useRuntimeEngine = false;
         private string _exeName = null;
-#if (MONO)
-        // TO-DO : remove this when issue has been fixed in Mono
-        // Mono does not (always) wait for process to exit when large timeout is
-        // specified (bug #45302)
-        private int _timeout = 100000;
-#else
-        private int _timeout = Int32.MaxValue;
-#endif
+        
+        private int _timeout = _defaultTimeout;
+        private static int _defaultTimeout;
+        
+        static ExternalProgramBase() {
+            if (PlatformHelper.IsMono) {
+                // TO-DO : remove this when issue has been fixed in Mono
+                // Mono does not (always) wait for process to exit when large timeout is
+                // specified (bug #45302)
+                _defaultTimeout = 100000;
+            } else {
+                _defaultTimeout = Int32.MaxValue;
+            }
+            _defaultTimeout = _defaultTimeout;
+        }
 
         #endregion Private Instance Fields
 
