Problem: If TypeMock is initialized and an XmlSerializer construction is attempted for a type in a signed assembly, the construction will fail and throw due to a typeloading error.
TypeMock v 3.5.1.
.NET fwk 1.1
using System;
using System.Xml.Serialization;
using TypeMock;
using SignedAssemblyCode.AnyType;
public class Class1
{
public static void Main()
{
MockManager.Init();
XmlSerializer serializer2 = new XmlSerializer( typeof(SignedAssemblyCode.AnyType) );
MockManager.Verify();
}
}
The namespace SignedAssemblyCode is imported from another assembly SignedAssembly, which is signed.
To get this to work:
* Remove signing of assembly
* Remove MockManager.Init
Consequence: Any tests that use XmlSerializers for signed assemblies will fail.
It seems very coincidental but hopefully knowledge of typemock internals may make sense of this behavior.
/mawi