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