Do not remap framework assembly if it's version is higher than the runtime version
authorAnkit Jain <ankit.jain@xamarin.com>
Tue, 23 Feb 2016 21:03:48 +0000 (16:03 -0500)
committerAnkit Jain <ankit.jain@xamarin.com>
Wed, 9 Mar 2016 20:37:12 +0000 (15:37 -0500)
commit100bd760a46811121b4b47ebba941d4fb98486ab
tree9b73d0261edc98f98f58a236d9764606e2343985
parent65b4aaf118b2982f2a2db38ad338ab6b6901b36f
Do not remap framework assembly if it's version is higher than the runtime version

Currently, assemblies like Microsoft.Build.Framework and
Microsoft.Build.Engine get remapped to the current runtime version, at
load time. This means that if an assembly references the above
assemblies with a version like `14.1.0.0`, then that would get remapped
to `4.0.0.0`. This is incorrect behavior and breaks msbuild. Instead,
now we do the remapping only if the requested version is lower than the
runtime version.

@akoplinger: This will actually impact xbuild too right now because
we're defaulting to xbuild 14.0 in Mono 4.4 now so we'd see messages
like Mono: The request to load the assembly Microsoft.Build.Framework
v14.0.0.0 was remapped to v4.0.0.0 in the assembly loading log, which
will break in very subtle ways.
mono/metadata/assembly.c