问题1:Type 'JDBYSJ.Data.NewsChannel' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.
翻译: “JDBYSJ.Data类型。NewsChannel”不能被序列化。考虑与DataContractAttribute属性标记,标记它的所有成员要序列化的DataMemberAttribute属性。或者,您可以确保公共和类型有一个无参数的构造函数——所有公共成员的类型将被序列化,也没有需要的属性。
问题原因:序列化的类里面有带参数的构造函数
解决方法:去掉该构造函数
 
 
问题2:该项目需要平台 SDK (UAP, Version=10.0.10586.0),但尚未安装。请访问如下链接以了解详细信息
问题原因:系统版本与程序需要的版本不匹配
解决方法:用文本方式打开csproj  然后搜索UAP   将UAP的值改为电脑当前版本的值。。。。。(改完之后可以加载但是运行的时候可能会出错)
 
 
问题3:Collection was modified; enumeration operation may not execute.
问题原因:foreach里面不能对集合进行Remove或者Add操作
解决方法:用for循环代替
posted on 2016-03-30 10:59  Mr.Owl  阅读(565)  评论(0编辑  收藏  举报