[Mono-bugs] [Bug 61991][Nor] New - Regression: Mono ignores privatebinpath containing dots

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 27 Jul 2004 00:54:38 -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 gert.driesen@pandora.be.


--- shadow/61991	2004-07-27 00:54:38.000000000 -0400
+++ shadow/61991.tmp.13659	2004-07-27 00:54:38.000000000 -0400
@@ -0,0 +1,82 @@
+Bug#: 61991
+Product: Mono: Runtime
+Version: unspecified
+OS Details: Windows XP SP1
+Status: NEW   
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Regression: Mono ignores privatebinpath containing dots
+There's a regression in Mono 1.0 (Windows) with regards to loading 
+assembly references from directories containing dots that are added to 
+the privatebinpath.  This used to work fine in previous versions of Mono 
+(eg. 0.28).
+I have been able to reproduce this issue using both Mono 1.0 (release) 
+and Mono/cvs on Windows.  Its working fine on Linux though.
+I attached a repro involving three assemblies :
+assembly a (exe)
+                  -->    assembly b (library)
+                (loads)                       -->    assembly c (library)
+                                          (references)
+Now, because of Mono bug (57602), the complete tree of dependencies will 
+be resolved when an assembly is loaded. In this case, it means that when 
+assembly b is loaded, Mono will immediately try to resolve the reference 
+to assembly c.
+In the repro I attached, assembly a and b are located in the same 
+directory, and so Mono should have no problem loading assembly b. 
+However, I've stored assembly c in a subdirectory in order to demonstrate 
+the loader issue. In order to allow Mono to resolve the reference to 
+assembly c you can add the subdirectory containing assembly c to the 
+In th repro, you can do this by passing the name of the subdirectory that 
+you want to append to the privatebinpath as argument to a.exe :
+Usage : mono a.exe <path to append to privatebinpath>
+For example :
+$ mono a.exe a.b
+This would/should instruct Mono to also check for referenced assemblies 
+in subdirectory 'a.b', but, as you'll notice, (if you're using Mono on 
+Windows that is) Mono cannot resolve the reference to assembly c if that 
+assembly is located in a directory containing dots :
+Adding a.b to private bin path.
+** (a.exe:1384): WARNING **: Could not find assembly c, references from 
+test-projects\privatepath - simple\b.dll (assemblyref_index=1)
+     Major/Minor: 0,0
+     Build:       0,0
+     Token:
+Unhandled Exception: System.IO.FileNotFoundException: File 'b.dll' not 
+in (unmanaged) (wrapper managed-to-native) 
+System.Reflection.Assembly:LoadFrom (string) in <0x00004> (wrapper 
+managed-to-native) System.Reflection.Assembly:LoadFrom (string)
+in <0x00074> a.SomeClass:Main (string[])
+Try renaming the subdirectory 'a.b' to a directory name without dots, for 
+example 'ab' and try running the test app again :
+$ mono a.exe ab
+This will work fine (as the directory does not contain dots).