Windows设计器给出的错误提示:
One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Unable to load type System.Collections.Generic.List`1[[fcPhotoGallUpload.keywordManeger+ListItem, KeywordMan, Version=1.0.2235.34332, Culture=neutral, PublicKeyToken=null]] required for deserialization.
Hide at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
at System.Resources.ResXDataNode.GenerateObjectFromDataNodeInfo(DataNodeInfo dataNodeInfo, ITypeResolutionService typeResolver)
at System.Resources.ResXDataNode.GetValue(ITypeResolutionService typeResolver)
at System.Resources.ResXResourceReader.ParseDataNode(XmlTextReader reader, Boolean isMetaData)
at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader) 这个窗体调用了一个我自己写的控件,里面有个属性ListItem
private List<MatchField> _MatchField = new List<MatchField>();
[Browsable(false)]
public List<MatchField> FieldList
{
get { return _MatchField; }
set
{
_MatchField = value;}
}下面是MatchField这个类的定义:[Serializable]
public class MatchField
{
private string _name;
public string Name
{
get { return _name; }
set { _name = value; }
} private bool _isMultiMatch = false;
public bool isMultiMatch
{
get { return _isMultiMatch; }
set { _isMultiMatch = value; }
}
private string _preSource="";
public string preSource
{
get { return _preSource; }
set { _preSource = value; }
}
}
有碰到这种问题或者有解决方案的,请大家不吝赐教;
这个问题困扰我很久了,解决的话可以额外追加分数;
One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Unable to load type System.Collections.Generic.List`1[[fcPhotoGallUpload.keywordManeger+ListItem, KeywordMan, Version=1.0.2235.34332, Culture=neutral, PublicKeyToken=null]] required for deserialization.
Hide at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
at System.Resources.ResXDataNode.GenerateObjectFromDataNodeInfo(DataNodeInfo dataNodeInfo, ITypeResolutionService typeResolver)
at System.Resources.ResXDataNode.GetValue(ITypeResolutionService typeResolver)
at System.Resources.ResXResourceReader.ParseDataNode(XmlTextReader reader, Boolean isMetaData)
at System.Resources.ResXResourceReader.ParseXml(XmlTextReader reader) 这个窗体调用了一个我自己写的控件,里面有个属性ListItem
private List<MatchField> _MatchField = new List<MatchField>();
[Browsable(false)]
public List<MatchField> FieldList
{
get { return _MatchField; }
set
{
_MatchField = value;}
}下面是MatchField这个类的定义:[Serializable]
public class MatchField
{
private string _name;
public string Name
{
get { return _name; }
set { _name = value; }
} private bool _isMultiMatch = false;
public bool isMultiMatch
{
get { return _isMultiMatch; }
set { _isMultiMatch = value; }
}
private string _preSource="";
public string preSource
{
get { return _preSource; }
set { _preSource = value; }
}
}
有碰到这种问题或者有解决方案的,请大家不吝赐教;
这个问题困扰我很久了,解决的话可以额外追加分数;
解决方案 »
- ---下面这个是什么语法?
- 请教用C#写一个UDP端口转发器
- 100分求高手解决ClickOne部署问题 : 部署和应用程序没有匹配的安全区域, 送美女QQ!
- 如何判断注册表的值是0还是1?
- 菜鸟请教:如何做圆形的按钮?
- C# Excel 导入 dataGridview
- 请问大家是如何解决sql 数据库字段设为 datetime ,默认为 null, c#里datagrid读出来确是1900-1-1的问题的?
- winForm菜单阴影高度不足,请看图!
- 想做个同期对比表,应该如何用C#编程实现??急!!谢谢!!!
- 在C#中如何插入资源?
- C# WINFORM如何删除动态增加的控件
- 既有Click事件,又有MouseDown,点击时,执行哪个?
2、清空sln,然后再rebuild sln
能详细说下吗
不一样吗?
private IList<MatchField> _MatchField;
public IList<MatchField> FieldList
{
get { return _MatchField; }
set
{
if(MatchField == value)
return;
_MatchField = value;
}
}
fcPhotoGallUpload.keywordManeger是命名空间;
ListItem是类,和我的自定义控件都在这个命名空间下
http://social.msdn.microsoft.com/forums/en-US/winformsdesigner/thread/9a9e3421-7b08-48a7-9c04-48a910711024/
具体做法是什么?