diff options
author | Marek Safar <marek.safar@gmail.com> | 2016-06-09 11:22:22 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2016-06-09 11:22:22 +0300 |
commit | 9f44f259bf5059df6c8019948ea75313bd09a9fb (patch) | |
tree | d65b8acf76b4e7d652a4b96894f7de44e722a9d1 | |
parent | 163b37483c08b5310c4e3d4c2e22a1ed59b1e6e0 (diff) |
Fixes FX assemblies unification with different build and revision versions.
This happens for PCL assemblies like System.Runtime which already exists in
versions 4.0.0.0, 4.0.10.0, 4.0.20.0
-rw-r--r-- | reflect/Fusion.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/reflect/Fusion.cs b/reflect/Fusion.cs index bc083239..c4bef4a7 100644 --- a/reflect/Fusion.cs +++ b/reflect/Fusion.cs @@ -219,15 +219,17 @@ namespace IKVM.Reflection } bool fxUnified = false; - bool versionMatch = version1 == version2; + + // build and revision numbers are ignored + bool fxVersionMatch = version1.Major == version2.Major && version1.Minor == version2.Minor; if (IsFrameworkAssembly(name1)) { - fxUnified |= !versionMatch; + fxUnified |= !fxVersionMatch; version1 = FrameworkVersion; } if (IsFrameworkAssembly(name2) && version2 < FrameworkVersionNext) { - fxUnified |= !versionMatch; + fxUnified |= !fxVersionMatch; version2 = FrameworkVersion; } @@ -274,7 +276,7 @@ namespace IKVM.Reflection return false; } } - else if (!versionMatch || fxUnified) + else if (fxUnified || version1 != version2) { result = partial ? AssemblyComparisonResult.EquivalentPartialFXUnified : AssemblyComparisonResult.EquivalentFXUnified; return true; |