Author: lluis
Date: 2007-03-28 16:53:53 -0500 (Wed, 28 Mar 2007)
New Revision: 75115

Modified:
   trunk/mono-addins/Test/ChangeLog
   trunk/mono-addins/Test/UnitTests/TestBase.cs
   trunk/mono-addins/Test/UnitTests/TestSetup.cs
Log:
* UnitTests/TestSetup.cs, UnitTests/TestBase.cs: Use Assembly.CodeBase,
  since Assembly.Location will return the wrong value when the
  assembly is loaded using shadow copy.

Modified: trunk/mono-addins/Test/ChangeLog
===================================================================
--- trunk/mono-addins/Test/ChangeLog    2007-03-28 21:53:39 UTC (rev 75114)
+++ trunk/mono-addins/Test/ChangeLog    2007-03-28 21:53:53 UTC (rev 75115)
@@ -1,3 +1,9 @@
+2007-03-28  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
+
+       * UnitTests/TestSetup.cs, UnitTests/TestBase.cs: Use Assembly.CodeBase,
+         since Assembly.Location will return the wrong value when the
+         assembly is loaded using shadow copy.
+
 2007-03-23  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        Added build files.

Modified: trunk/mono-addins/Test/UnitTests/TestBase.cs
===================================================================
--- trunk/mono-addins/Test/UnitTests/TestBase.cs        2007-03-28 21:53:39 UTC 
(rev 75114)
+++ trunk/mono-addins/Test/UnitTests/TestBase.cs        2007-03-28 21:53:53 UTC 
(rev 75115)
@@ -16,7 +16,8 @@
                        AddinManager.AddinLoaded += OnLoad;
                        AddinManager.AddinUnloaded += OnUnload;
                        
-                       AddinManager.Initialize (Path.GetDirectoryName 
(GetType().Assembly.Location));
+                       string dir = new Uri 
(GetType().Assembly.CodeBase).LocalPath;
+                       AddinManager.Initialize (Path.GetDirectoryName (dir));
                        AddinManager.Registry.ResetConfiguration ();
                        AddinManager.Registry.Update (new ConsoleProgressStatus 
(true));
                }

Modified: trunk/mono-addins/Test/UnitTests/TestSetup.cs
===================================================================
--- trunk/mono-addins/Test/UnitTests/TestSetup.cs       2007-03-28 21:53:39 UTC 
(rev 75114)
+++ trunk/mono-addins/Test/UnitTests/TestSetup.cs       2007-03-28 21:53:53 UTC 
(rev 75115)
@@ -13,7 +13,8 @@
                [Test]
                public void TestInitialize ()
                {
-                       AddinManager.Initialize (Path.GetDirectoryName 
(GetType().Assembly.Location));
+                       string dir = new Uri 
(GetType().Assembly.CodeBase).LocalPath;
+                       AddinManager.Initialize (Path.GetDirectoryName (dir));
                        AddinManager.Registry.ResetConfiguration ();
                        AddinManager.Registry.Update (new ConsoleProgressStatus 
(true));
                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to