当前位置: 首页 > news >正文

Resx 文件无效,未能加载 .RESX 文件中使用的类型

错误信息提示:

错误	339	Resx 文件无效。未能加载 .RESX 文件中使用的类型 Forms.ListItems, Forms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null。请确保已在项目中添加了必需的引用。 第 136 行,位置 5。	E:\Forms\Form2.resx	136	5	Forms


<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 2.0
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used for serialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>

解决方案:

      将 .RESX文件里的那个<data……></data>删除,即可。

相关文章:

  • JDK中文方框乱码问题
  • 32 脚本编程风格
  • 让低版本的 Android 项目显示出 Material 风格的点击效果
  • eclipse安装pydev插件时没有任何错误提示,但是就是装完了后不显示pydev的设置项...
  • bzoj2337
  • android sqlite 数据类型
  • 来一篇新鲜的招聘笔试题(2014秋招版)
  • 接口和实现分离的好处
  • SQL数据库如何存储?
  • UIGestureRecognizerState
  • HashMap工作原理(转载)
  • hive 更多资料urls
  • hive0.13.1配置hwi
  • CSS3 Filter的十种特效
  • Memcache学习总结
  • [原]深入对比数据科学工具箱:Python和R 非结构化数据的结构化
  • 【React系列】如何构建React应用程序
  • canvas绘制圆角头像
  • Javascript 原型链
  • Java-详解HashMap
  • js中forEach回调同异步问题
  • learning koa2.x
  • leetcode-27. Remove Element
  • Map集合、散列表、红黑树介绍
  • text-decoration与color属性
  • Traffic-Sign Detection and Classification in the Wild 论文笔记
  • Xmanager 远程桌面 CentOS 7
  • #{} 和 ${}区别
  • (1)Nginx简介和安装教程
  • (10)ATF MMU转换表
  • (11)工业界推荐系统-小红书推荐场景及内部实践【粗排三塔模型】
  • (4.10~4.16)
  • (Redis使用系列) Springboot 实现Redis 同数据源动态切换db 八
  • (TOJ2804)Even? Odd?
  • (zt)基于Facebook和Flash平台的应用架构解析
  • (独孤九剑)--文件系统
  • (附源码)计算机毕业设计ssm-Java网名推荐系统
  • (求助)用傲游上csdn博客时标签栏和网址栏一直显示袁萌 的头像
  • (一) springboot详细介绍
  • (一)Linux+Windows下安装ffmpeg
  • (转)EOS中账户、钱包和密钥的关系
  • .NET Conf 2023 回顾 – 庆祝社区、创新和 .NET 8 的发布
  • .net framework4与其client profile版本的区别
  • .NET/C# 将一个命令行参数字符串转换为命令行参数数组 args
  • .Net6使用WebSocket与前端进行通信
  • @manytomany 保存后数据被删除_[Windows] 数据恢复软件RStudio v8.14.179675 便携特别版...
  • @德人合科技——天锐绿盾 | 图纸加密软件有哪些功能呢?
  • [ vulhub漏洞复现篇 ] JBOSS AS 4.x以下反序列化远程代码执行漏洞CVE-2017-7504
  • [ 攻防演练演示篇 ] 利用通达OA 文件上传漏洞上传webshell获取主机权限
  • [ 数据结构 - C++] AVL树原理及实现
  • [AIGC] Java 和 Kotlin 的区别
  • [AUTOSAR][诊断管理][ECU][$37] 请求退出传输。终止数据传输的(上传/下载)
  • [Bzoj4722]由乃(线段树好题)(倍增处理模数小快速幂)
  • [C++]类和对象【上篇】
  • [C++数据结构](31)哈夫曼树,哈夫曼编码与解码