I have developed an application using .net 3.5 and have deployed it as an .exe on a number of machines with the same environment. However, on one particular machine I get th
It may be also just some simple error in the serialized class (typically a result of some copy/paste). For example the following class will cause this error:
public class Foo
{
private string[] contexts;
///
[System.Xml.Serialization.XmlArrayItemAttribute("Context",
typeof(Property), IsNullable = false)]
public string[] Contexts
{
get { return this.contexts; }
set { this.contexts = value; }
}
}
Notice that typeof(Property) parameter in XmlArrayItem attribute is not compatible (most likely) with string causing similar exception:
System.InvalidOperationException:
Unable to generate a temporary class (result=1).
If typeof(Property) is replaced with typeof(string) serialization will work again.