发现一个关于序列化的异常

猴头 猴头 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
提示的异常如下:
程序集“WinDraw, Version=1.2.2.0, Culture=neutral, PublicKeyToken=null”中的类型“WinDraw.DrawView”未标记为可序列化。

展开的错误信息:

在 System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
在 System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
在 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
在 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
在 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
在 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
在 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
在 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
在 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
在 WinDraw.Core.CommonFunction.CloneObj[T](T RealObject) 位置 E:\分局级解决方案\源码\BranchScene\WinDraw\Core\CommonFunction.cs:行号 680
在 WinDraw.DrawView.EnterRecognize() 位置 E:\分局级解决方案\源码\BranchScene\WinDraw\DrawViewFunc.cs:行号 6374
在 WinDraw.DrawView.set_IsRecognitionCurve(Boolean value) 位置 E:\分局级解决方案\源码\BranchScene\WinDraw\DrawViewField.cs:行号 582
在 WinDraw.MenuLib.RecogAdapter.Method_Slot(Object sender, EventArgs e) 位置 E:\分局级解决方案\源码\BranchScene\WinDraw\MenuLib\RecogAdapter.cs:行号 44
在 DevComponents.DotNetBar.BaseItem.RaiseClick(eEventSource source)
在 DevComponents.DotNetBar.BaseItem.InternalMouseUp(MouseEventArgs objArg)
在 DevComponents.DotNetBar.PopupItem.InternalMouseUp(MouseEventArgs objArg)
在 DevComponents.DotNetBar.ButtonItem.InternalMouseUp(MouseEventArgs objArg)
在 DevComponents.DotNetBar.BaseItem.InternalMouseUp(MouseEventArgs objArg)
在 DevComponents.DotNetBar.ItemContainer.InternalMouseUp(MouseEventArgs objArg)
在 DevComponents.DotNetBar.ItemControl.OnMouseUp(MouseEventArgs e)
在 DevComponents.DotNetBar.RibbonBar.OnMouseUp(MouseEventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 DevComponents.DotNetBar.ItemControl.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

我仔细查看了一边代码,实在找不到 到底是哪儿 缺少序列化标记了,
另外 DrawView 是个 自定义控件.
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
猴头
C# 111,128 成员 642,536 内容