[Mono-bugs] [Bug 65641][Nor] New - privatebinpath for new domain is not used when resolving assembly references

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 9 Sep 2004 15:44:24 -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/65641	2004-09-09 15:44:24.000000000 -0400
+++ shadow/65641.tmp.27143	2004-09-09 15:44:24.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 65641
+Product: Mono: Runtime
+Version: unspecified
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: privatebinpath for new domain is not used when resolving assembly references
+When setting the privatebinpath in the AppDomainSetup for a new domain, the
+specified privatebinpath is not used to resolve assembly references in that
+new domain.
+I can reproduce this issue using both CVS HEAD and the MONO-1-0 branch.
+I've attached a test case that contains three assemblies :
+ - test.exe
+ - b.dll
+ - c.dll (located in directory "ab")
+In the test assembly, I create a new AppDomain with privatebinpath set to
+"ab". I then instantiate and unwrap a type in that new domain.
+Next, I execute a method that type. In that method assembly "b" is loaded and  
+using reflection I create an instance of a type in assembly "b". Finally, I
+use relfection to invoke a method that type. In this method, an instance of
+a type in assembly "c" is created.
+Now, assembly "c" is in directory "ab", but as the privatebinpath of the
+newly created domain is set to "ab" the runtime should be able to locate
+that assembly.
+To reproduce the bug :
+1. extract the content of the attached tar
+2. run the test.exe assembly ($ mono test.exe)
+On MS.NET the test app works fine, but on Mono you get the following
+exception :
+** (test.exe:15473): WARNING **: Could not find assembly c, references from
+/home/gert/mono-test-projects/privatebinpath/b.dll (assemblyref_index=1)
+     Major/Minor: 0,0
+     Build:       0,0
+     Token:
+Unhandled Exception: System.IO.FileNotFoundException: File 'b.dll' not found.
+in <0x00601> System.Runtime.Remoting.Proxies.RealProxy:PrivateInvoke
+Note: although this issue ressembles mono bug #61991, these are actually
+two separate issues mono bug #61991: 
+- mono bug #61991 deals with privatebinpath in the current domain, and uses
+AppendPrivatePath to modify the privatebinpath of the current domain
+- this new bug deals with a privatebinpath of a newly created domain, and
+uses AppDomainSetup.PrivateBinPath to specify the privatebinpath of the new
+- mono bug #61991 only affects CVS HEAD, while this new bug affects both
+MONO-1-0 branch and CVS HEAD