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.
if (aname->major == vset->major && aname->minor == vset->minor &&
aname->build == vset->build && aname->revision == vset->revision)
return aname;
+
+ if (compare_versions (vset, aname) < 0) {
+ // requested version is newer than current
+ // runtime version, don't remap
+ return aname;
+ }
if ((aname->major | aname->minor | aname->build | aname->revision) != 0)
mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_ASSEMBLY,