Index: trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeStringBuilder.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeStringBuilder.cs	(revision 1779)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeStringBuilder.cs	(revision 1780)
@@ -365,4 +365,8 @@
 
     public string ToString(bool full) {
+      return ToString(full, true);
+    }
+
+    public string ToString(bool full, bool includeAssembly) {
       StringBuilder sb = new StringBuilder();
       sb.Append(Namespace).Append('.').Append(ClassName);
@@ -380,9 +384,10 @@
       }
       sb.Append(MemoryMagic);
-      if (AssemblyName != null)
+      if (includeAssembly && AssemblyName != null) {
         sb.Append(", ").Append(AssemblyName);
-      if (full)
-        foreach (var property in AssemblyAttribues)
-          sb.Append(", ").Append(property.Key).Append('=').Append(property.Value);
+        if (full)
+          foreach (var property in AssemblyAttribues)
+            sb.Append(", ").Append(property.Key).Append('=').Append(property.Value);
+      }
       return sb.ToString();
     }
@@ -393,20 +398,24 @@
 
     public bool IsOlderThan(TypeName t) {
-      if (this.ClassName != t.ClassName ||
-        this.Namespace != t.Namespace ||
-        this.AssemblyName != t.AssemblyName)
-        throw new Exception("Cannot compare versions of different types");
-      if (CompareVersions(
-        this.AssemblyAttribues["Version"],
-        t.AssemblyAttribues["Version"]) < 0)
-        return true;
-      IEnumerator<TypeName> thisIt = this.GenericArgs.GetEnumerator();
-      IEnumerator<TypeName> tIt = t.GenericArgs.GetEnumerator();
-      while (thisIt.MoveNext()) {
-        tIt.MoveNext();
-        if (thisIt.Current.IsOlderThan(tIt.Current))
+      try {
+        if (this.ClassName != t.ClassName ||
+          this.Namespace != t.Namespace ||
+          this.AssemblyName != t.AssemblyName)
+          throw new Exception("Cannot compare versions of different types");
+        if (CompareVersions(
+          this.AssemblyAttribues["Version"],
+          t.AssemblyAttribues["Version"]) < 0)
           return true;
-      }
-      return false;
+        IEnumerator<TypeName> thisIt = this.GenericArgs.GetEnumerator();
+        IEnumerator<TypeName> tIt = t.GenericArgs.GetEnumerator();
+        while (thisIt.MoveNext()) {
+          tIt.MoveNext();
+          if (thisIt.Current.IsOlderThan(tIt.Current))
+            return true;
+        }
+        return false;
+      } catch (KeyNotFoundException) {
+        throw new Exception("Could not extract version information from type string");
+      }
     }
 
Index: trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs	(revision 1779)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs	(revision 1780)
@@ -9,4 +9,45 @@
 namespace HeuristicLab.Persistence.Core {
 
+  public class TypeLoader {
+
+    public static Type Load(string typeNameString) {
+      Type type;
+      try {
+        type = Type.GetType(typeNameString, true);
+      } catch (Exception) {
+        Logger.Warn(String.Format(
+          "Cannot load type \"{0}\", falling back to loading with partial name", typeNameString));
+        try {
+          TypeName typeName = TypeNameParser.Parse(typeNameString);
+          Assembly a = Assembly.LoadWithPartialName(typeName.AssemblyName);
+          type = a.GetType(typeName.ToString(false, false), true);
+        } catch (Exception) {
+          throw new PersistenceException(String.Format(
+            "Could not load type \"{0}\"",
+            typeNameString));
+        }
+        try {
+          if (
+            TypeNameParser.Parse(type.AssemblyQualifiedName).IsOlderThan(
+            TypeNameParser.Parse(typeNameString)))
+            throw new PersistenceException(String.Format(
+              "Serialized type is newer than available type: serialized: {0}, loaded: {1}",
+              typeNameString,
+              type.AssemblyQualifiedName));
+        } catch (PersistenceException) {
+          throw;
+        } catch (Exception e) {
+          Logger.Warn(String.Format(
+            "Could not perform version check requested type was {0} while loaded type is {1}:",
+            typeNameString,
+            type.AssemblyQualifiedName),
+            e);
+        }
+      }
+      return type;
+    }
+
+  }
+
   public class Deserializer {
 
@@ -71,23 +112,7 @@
         var map = new Dictionary<Type, object>();
         foreach (var typeMapping in typeCache) {
-          Type type;
-          try {
-            type = Type.GetType(typeMapping.TypeName, true);
-          } catch (Exception) {
-            Logger.Error(String.Format(
-              "Cannot load type \"{0}\", falling back to loading with partial name", typeMapping.TypeName));
-            string[] typeNameParts = typeMapping.TypeName.Split(new[] { ',' });
-            try {
-              Assembly a = Assembly.LoadWithPartialName(typeNameParts[typeNameParts.Length - 1].Trim());
-              Array.Resize(ref typeNameParts, typeNameParts.Length - 1);
-              type = a.GetType(string.Join(",", typeNameParts), true);
-            } catch (Exception) {
-              throw new PersistenceException(String.Format(
-                "Could not load type \"{0}\"",
-                typeMapping.TypeName));
-            }
-          }
+          Type type = TypeLoader.Load(typeMapping.TypeName);
           typeIds.Add(typeMapping.Id, type);
-          Type serializerType = Type.GetType(typeMapping.Serializer, true);
+          Type serializerType = TypeLoader.Load(typeMapping.Serializer);
           map.Add(type, Activator.CreateInstance(serializerType, true));
         }
@@ -101,4 +126,5 @@
       }
     }
+
 
     public object Deserialize(IEnumerable<ISerializationToken> tokens) {
Index: trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs	(revision 1779)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs	(revision 1780)
@@ -40,9 +40,10 @@
           IFormatter f = configuration.GetFormatter(pair.Key);
           if (f != null) {
-            serializer = f.GetType().VersionInvariantName();
+            serializer = f.GetType().AssemblyQualifiedName;
           } else {
             IDecomposer d = configuration.GetDecomposer(pair.Key);
-            serializer = d.GetType().VersionInvariantName();
+            serializer = d.GetType().AssemblyQualifiedName;
           }
+          //result.Add(new TypeMapping(pair.Value, pair.Key.AssemblyQualifiedName, serializer));
           result.Add(new TypeMapping(pair.Value, pair.Key.VersionInvariantName(), serializer));
         }
Index: trunk/sources/HeuristicLab.Persistence/UnitTests/UseCases.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/UnitTests/UseCases.cs	(revision 1779)
+++ trunk/sources/HeuristicLab.Persistence/UnitTests/UseCases.cs	(revision 1780)
@@ -15,4 +15,5 @@
 using HeuristicLab.Persistence.Default.Decomposers;
 using HeuristicLab.Persistence.Auxiliary;
+using System.Text.RegularExpressions;
 
 namespace HeuristicLab.Persistence.UnitTest {
@@ -510,5 +511,5 @@
 
     [TestMethod]
-    public void TestSavingException() {      
+    public void TestSavingException() {
       List<int> list = new List<int> { 1, 2, 3 };
       XmlGenerator.Serialize(list, tempFile);
@@ -528,7 +529,34 @@
       string shortName =
         "System.Collections.Generic.List`1[[System.Int32, mscorlib]][], mscorlib";
-      Assert.AreEqual(name, TypeNameParser.Parse(name).ToString());        
+      Assert.AreEqual(name, TypeNameParser.Parse(name).ToString());
       Assert.AreEqual(shortName, TypeNameParser.Parse(name).ToString(false));
       Assert.AreEqual(shortName, typeof(List<int>[]).VersionInvariantName());
+    }
+
+    [TestMethod]
+    public void TestAssemblyVersionCheck() {
+      IntWrapper i = new IntWrapper(1);
+      Serializer s = new Serializer(i, ConfigurationService.Instance.GetDefaultConfig(new XmlFormat()));
+      XmlGenerator g = new XmlGenerator();
+      StringBuilder dataString = new StringBuilder();
+      foreach (var token in s) {
+        dataString.Append(g.Format(token));
+      }
+      StringBuilder typeString = new StringBuilder();
+      foreach (var line in g.Format(s.TypeCache))
+        typeString.Append(line);
+      Deserializer d = new Deserializer(XmlParser.ParseTypeCache(new StringReader(typeString.ToString())));
+      XmlParser p = new XmlParser(new StringReader(dataString.ToString()));
+      IntWrapper newI = (IntWrapper)d.Deserialize(p);
+      Assert.AreEqual(i.Value, newI.Value);
+      string newTypeString = Regex.Replace(typeString.ToString(),
+        "Version=(\\d+\\.\\d+\\.\\d+\\.\\d+)",
+        "Version=9999.9999.9999.9999");
+      try {
+        d = new Deserializer(XmlParser.ParseTypeCache(new StringReader(newTypeString)));
+        Assert.Fail("Exception expected");
+      } catch (PersistenceException) {
+        // EXPECTED
+      }
     }
 
@@ -536,5 +564,5 @@
     public static void Initialize(TestContext testContext) {
       ConfigurationService.Instance.Reset();
-    }    
-  }  
+    }
+  }
 }
