我寫了一個有幾個類的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進行故障排除。 –