[Mono-bugs] [Bug 65866][Blo] New - Load of assembly fails on Linux but succeeds on Windows 2000

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 13 Sep 2004 13:23:03 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by martin.tapp@cae.com.

http://bugzilla.ximian.com/show_bug.cgi?id=65866

--- shadow/65866	2004-09-13 13:23:03.000000000 -0400
+++ shadow/65866.tmp.3170	2004-09-13 13:23:03.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 65866
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: RedHat 9.x
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: martin.tapp@cae.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Load of assembly fails on Linux but succeeds on Windows 2000
+
+Using the following code: 
+ 
+Assembly wAssembly = 
+AppDomain.CurrentDomain.Load(AssemblyName.GetAssemblyName("/some/path/bin/AnAssembly.dll")); 
+ 
+ 
+Throws exception: 
+ 
+Unhandled Exception: System.IO.FileNotFoundException: File 'AnAssembly,  
+Version=1.0.1717.22874, Culture=neutral, PublicKeyToken=null' not found. 
+in <0xc659163a> (wrapper managed-to-native) System.AppDomain:LoadAssembly 
+(string,System.Security.Policy.Evidence) 
+ 
+ 
+AnAssembly.dll is loaded from a path that corresponds to the current 
+executable path.  Here, the program resides in /some/path/bin as well as 
+AnAssembly.dll. 
+ 
+On Windows 2000, the AppDomain.Load method always looks in the current 
+exe path for assemblies.  Also, since AnAssembly.dll is dynamically 
+constructed through Reflection.Emit, it is not possible to add it in 
+/etc/mono/config.  Futhermore, the name needs to be in the form 
+"AssemblyName.dll", and not "libAssemblyName.so", since the code will not 
+be portable. 
+ 
+Thanks! 
+ 
+Martin Tapp