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 228 [details]
test case project
Type.Load("Assembly.Type, Assembly, Version=x.x.x.x"); loads a type even when the requested version is different from the (strongly named) assembly version.
.NET runtime throws a FileLoadException:
> Could not load file or assembly 'StrongAssembly, Version=1.0.9999.9999'
> or one of its dependencies. The located assembly's manifest definition
> does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Mono runtime loads the type without any sign of error.
A simple test project exhibiting the bug is attached
Not a duplicate of bug 49721, sadly, because it looks like I missed one branch of control flow in the assembly loader.
Fixed on mono master https://github.com/mono/mono/commit/25bcd22d15d47ff50503631901fb851c97bb03c7
Fixed on mono 2017-04 https://github.com/mono/mono/commit/59ffe0a31618b00da0cc08166bad0d4d33864bf6