우리는 직렬화 등의 데이터를 보유하고 클립보드에서 패스에서 윈도우에서 제어하는 WPF 제어합니다. 이에서 일했 framework4.8 후 변환니다.Net5 우리는 이제 오류가 발생합니다. 형'시스템이다.RuntimeType'어셈블리에서'시스템이다.Private.CoreLib,Version=5.0.0.0,Culture=neutral,PublicKeyToken=7cec85d7bea7798e'으로 표시되지 않은 직렬화.
이 발생합에서 드롭다운 이벤트를 처리기 WPF 라인:
var tClip = e.Data.GetDataPresent(typeof(ClipboardDescriptor));
여기서'e'는 시스템입니다.Windows.DragEventArgs.
using System;
using System.Windows.Forms;
namespace Support.Classes
{
/// <summary>
/// Summary description for ClipboardDescriptor.
/// </summary>
[Serializable]
public class ClipboardDescriptor
{
private Guid id;
private Guid parentDocumentID;
private System.Type objtype;
private TreeNode baseTreeNode;
private string objname;
public ClipboardDescriptor()
{
baseTreeNode = null;
}
public Guid ParentDocumentID
{
get { return(parentDocumentID); }
set { parentDocumentID = value; }
}
public Guid ID
{
get { return(id); }
set { id = value; }
}
public System.Type ObjType
{
get { return(objtype); }
set { objtype = value; }
}
public string ObjName
{
get { return(objname); }
set { objname = value; }
}
/// <summary>
/// Get the treenode that this object is associated with
/// </summary>
public TreeNode BaseTreeNode
{
get { return(baseTreeNode); }
set { baseTreeNode = value; }
}
}
}