--- TaskBuilder.cs	Sun May 25 06:20:24 2003
+++ C:\Src\nant\nant\src\NAnt.Core\TaskBuilder.cs	Wed Sep 10 20:42:22 2003
@@ -100,8 +100,16 @@
             } else {
                 //check to see if it is loaded already
                 Assembly[] ass = AppDomain.CurrentDomain.GetAssemblies();
-                for (int i = 0; i < ass.Length; i++){
-                    if (ass[i].Location != null && ass[i].Location == AssemblyFileName) { 
+                for (int i = 0; i < ass.Length; i++) {
+                    string assLocation;
+                    try {
+                        assLocation = ass[i].Location;
+                    }
+                    catch (NotSupportedException)
+                    {
+                        assLocation = null;
+                    }
+                    if (assLocation != null && assLocation == AssemblyFileName) { 
                         assembly = ass[i];
                         return assembly;
                     }
