[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.


--- 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 Details: RedHat 9.x
+Status: NEW   
+Priority: Blocker
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: martin.tapp@cae.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Load of assembly fails on Linux but succeeds on Windows 2000
+Using the following code: 
+Assembly wAssembly = 
+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 
+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 
+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. 
+Martin Tapp