我写了一个有几个类的dll。其中之一被称为DataDesign。反序列化过程中的异常
[Serilizible]
public class DataDesign
{
[NonSerialized]
HorizantalFields _horizantalFields;
[NonSerialized]
VerticalFields _verticalFields;
[NonSerialized]
GeneralDataDesignViewType _dataDesignView;
[NonSerialized]
Dictionary<FieldTemplateType, string> _templateTable;
[NonSerialized]
public List<string> ProcessedData;
List<IField> _fields;
}
当我在我的应用程序中使用此dll时,我在deserilizing过程中遇到问题。 Serilizing最终取得成功。但是在反序列化中,我有一个例外。
唯一的例外是
“无法找到组件 'AnalyzingData,版本= 1.0.0.0,文化=中性公钥=空'”。
analyzeData是dll的名称。
DeSerilizeClass()
{
BinaryFormatter bin = new BinaryFormatter();
dataDesign=new DataDesign();
DataDesign dd= (DataDesign)bin.Deserialize(stream);
}
Serilize()
{
using (FileStream sr = new FileStream(String.Format(@"{0}\{1}", Parameters.SavedConfigurationsDirectory, dataDesignName),FileMode.CreateNew, FileAccess.Write))
{
BinaryFormatter bin = new BinaryFormatter();
bin.Serialize(sr, this);
}
}
//这个datadesign类
我怎样才能解决这个问题?
MS visual Studio2010。 Windows 7 感谢您的关注!
错误信息的哪一部分不够清楚? – Jon
'版本= 1.0.0.0'是常见的挂机。什么是你的当前分析数据库的[AssemblyVersion]?使用Fuslogvw.exe进行故障排除。 –