【发布时间】:2013-12-01 14:10:02
【问题描述】:
我的课程在 MySerializer.Deserialize(Int32, Object, ProtoReader) 中导致 BadImageFormatException (HRESULT: 0x8007000B)。
该类不在任何地方使用。它只是手动添加到类型模型并编译到程序集中。
没有这个类一切都好。
using System;
using ProtoBuf;
namespace MyProject
{
[ProtoContract(ImplicitFields = ImplicitFields.PublicProperties, ExplicitPropertiesContract = true, IgnoreListHandling = true, AsReferenceDefault = true)]
[Serializable]
public class DataSharedStorage<T>
{
T _value;
public DataSharedStorage()
{
}
public T Value
{
get
{
return _value;
}
set
{
_value = value;
}
}
public static implicit operator T(DataSharedStorage<T> storage)
{
return storage.Value;
}
}
}
可能是什么原因?
【问题讨论】:
标签: c# .net serialization protobuf-net