Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/23/10 20:17:59 (14 years ago)
Author:
epitzer
Message:

explicitly allow different versions for mscorlib, this facilitates upgrading (#1350)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs

    r4806 r5172  
    235235        }
    236236        return false;
    237       }
    238       catch (KeyNotFoundException) {
     237      } catch (KeyNotFoundException) {
    239238        throw new Exception("Could not extract version information from type string");
    240239      }
     
    258257        Version thisVersion = new Version(this.AssemblyAttribues["Version"]);
    259258        Version tVersion = new Version(typeName.AssemblyAttribues["Version"]);
    260         if (thisVersion.Major != tVersion.Major ||
    261           thisVersion.Minor != tVersion.Minor)
     259        if (this.AssemblyName == "mscorlib" &&
     260          (thisVersion.Major == 2 || thisVersion.Major == 4) &&
     261          (tVersion.Major == 2 || tVersion.Major == 4)) {
     262          // skip version check
     263        } else if (thisVersion.Major != tVersion.Major ||
     264                   thisVersion.Minor != tVersion.Minor)
    262265          return false;
    263266        IEnumerator<TypeName> thisIt = this.GenericArgs.GetEnumerator();
     
    269272        }
    270273        return true;
    271       }
    272       catch (KeyNotFoundException) {
     274      } catch (KeyNotFoundException) {
    273275        throw new Exception("Could not extract version infomration from type string");
    274276      }
Note: See TracChangeset for help on using the changeset viewer.