Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 3631 [details]
Compile program to reproduce
When calling Assembly.Load(byte) on 2 (or more) different assemblies but with the same name, the initial assembly is loaded and cached for subsequent calls. This is different behavior than in Microsoft's implementation.
static void Main(string args)
var class1 = File.ReadAllBytes("Class1/TestLib.dll");
var class2 = File.ReadAllBytes("Class2/TestLib.dll");
var ass1 = Assembly.Load(class1);
Console.WriteLine(ass1.GetExportedTypes().FullName); // should print 'TestLib.Class1'
var ass2 = Assembly.Load(class2);
Console.WriteLine(ass2.GetExportedTypes().FullName); // should print 'TestLib.Class2'
TestLib.dll only contains 1 class depending on the subdirectory.
In the second case, Mono prints 'TestLib.Class1'.
Sample program attached.
Tested on Mono compiled from source (3.0.8).
Is this ever going to be addressed or acknowlegded?
We'll get to this bug at some time in the future, thanks for reporting.
*** Bug 11420 has been marked as a duplicate of this bug. ***
I can reproduce with 220.127.116.116 (master/117468d740a)
This should be fixed in mono master by https://github.com/mono/mono/commit/40c13f7b0ff71bfff8e58f8bd66bca0734d7d284