From f505808c8bf8adb0c64a6aaf0a11a532309c478e Mon Sep 17 00:00:00 2001 From: Fraser Waters <frassle@gmail.com> Date: Sun, 14 Jan 2018 19:07:01 +0000 Subject: [PATCH] Remove assembly version checks from resolver Not sure how this version check slipped in. It's not present in upstream cecil code or the disassembled code from our current copy of mono.cecil.dll. Fixes #710 --- .../OpenTKAssemblyResolver.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/Generator.Rewrite/OpenTKAssemblyResolver.cs b/src/Generator.Rewrite/OpenTKAssemblyResolver.cs index 1bdd0a9d..092cf84c 100644 --- a/src/Generator.Rewrite/OpenTKAssemblyResolver.cs +++ b/src/Generator.Rewrite/OpenTKAssemblyResolver.cs @@ -93,11 +93,7 @@ namespace OpenTK.Rewrite continue; try { - var assembly = GetAssembly(file, parameters); - if (assembly.Name.Version == name.Version || IsZero(name.Version)) - { - return assembly; - } + return GetAssembly(file, parameters); } catch (System.BadImageFormatException) { @@ -248,11 +244,7 @@ namespace OpenTK.Rewrite var file = GetAssemblyFile(reference, string.Empty, gac_path); if (File.Exists(file)) { - var assembly = GetAssembly(file, parameters); - if (assembly.Name.Version == reference.Version || IsZero(reference.Version)) - { - return assembly; - } + return GetAssembly(file, parameters); } } @@ -272,11 +264,7 @@ namespace OpenTK.Rewrite var file = GetAssemblyFile(reference, prefixes[i], gac); if (Directory.Exists(gac) && File.Exists(file)) { - var assembly = GetAssembly(file, parameters); - if (assembly.Name.Version == reference.Version || IsZero(reference.Version)) - { - return assembly; - } + return GetAssembly(file, parameters); } } }