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<?

错误信息提示:

错误	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>删除,即可。

相关文章
|
存储 人工智能 自然语言处理
多模态RAG:三步构建图文并茂的智能问答、电商导购助手
本文介绍了如何使用OpenSearch LLM智能问答版,三步搭建一站式多模态RAG系统。
1800 9
|
机器学习/深度学习 安全 算法
计算机前沿技术-人工智能算法-大语言模型-最新论文阅读-2024-09-23(下)
计算机前沿技术-人工智能算法-大语言模型-最新论文阅读-2024-09-23(下)
|
Python
【Python】使用LogisticRegression出现错误: invalid type promotion
使用Python中的LogisticRegression时遇到TypeError: invalid type promotion错误的解决方法,指出错误原因是因为输入的DataFrame包含datetime类型的数据,并提供了通过删除datetime字段来解决此问题的步骤。
164 3
|
关系型数据库 MySQL Nacos
使用 Docker 部署 Nacos 并配置 MySQL 数据源
使用 Docker 部署 Nacos 并配置 MySQL 数据源
3674 0
|
Cloud Native 安全 自动驾驶
全新升级!《云原生架构白皮书 2022 版》重磅发布
今年,《云原生架构白皮书2022版》正式上线,相较于2020年版本,本次内容新增数十家企业实战经验合集,同时在云原生产品矩阵中,新增多个核心产品家族,如容器产品家族、微服务产品家族、云原生技术中台 CNStack 产品家族等,更加一站式助力企业数字化转型。
9324 1
全新升级!《云原生架构白皮书 2022 版》重磅发布
|
云计算 开发者 人工智能
现场直击:2023阿里云峰会精彩发布抢先看(内含福利)
2023阿里云峰会 与实俱进 为创新提速!
343220 15
现场直击:2023阿里云峰会精彩发布抢先看(内含福利)
|
SQL 存储 关系型数据库
【已解决】MySQL 事务回滚机制失效之误用 truncate 删除表数据
【已解决】MySQL 事务回滚机制失效之误用 truncate 删除表数据
643 0
|
JavaScript 测试技术
Vue3 响应式原理之scheduler、stop
这里引用一下 Vue 官方的经典测试用例来测试 scheduler 功能
368 0
Vue3 响应式原理之scheduler、stop
|
算法 Java 大数据
ZooKeeper 如何保证数据的一致性?【重要】
ZooKeeper 如何保证数据的一致性?【重要】
226 0