错误175:ADO.MySql.Data.MySqlClient'未在机器或应用程序配置文件中注册

本文关键字:机器 应用程序 注册 配置文件 ADO MySql Data MySqlClient 错误 | 更新日期: 2023-09-27 18:02:31

我的一个客户给了我一个VS2015解决方案文件,我应该在上面工作。但是,我无法编译它。我也在使用VS2015。

它使用实体框架,我不太了解。

给出的错误是:error 175: The ADO。. NET提供程序具有不变名称"MySql.Data"。MySqlClient’没有在机器或应用程序配置文件中注册,或者无法加载。有关详细信息,请参阅内部异常。

错误指向一个EDMX文件,如下所示:

我不知道从哪里开始或如何解决这个问题。任何帮助吗?由于

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
      <Schema Namespace="NFMTestModel.Store" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.7" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <!--Errors Found During Generation:
warning 6002: The table/view 'def.nfm.air' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
        <EntityType Name="air">
          <Key>
            <PropertyRef Name="DateAndTime" />
          </Key>
          <Property Name="DateAndTime" Type="datetime" Precision="0" Nullable="false" />
          <Property Name="Air_System_Air_line_1_Service_Pressure_Value" Type="double" />
          <Property Name="Air_System_Air_line_2_emergency_Pressure_Value" Type="double" />
          <Property Name="Air_System_Air_Manlock_point_11_Pressure_Value" Type="double" />
          <Property Name="Air_System_Air_Manlock_point_12_Pressure_Value" Type="double" />
          <Property Name="Air_System_Air_Manlock_point_21_Pressure_Value" Type="double" />
          <Property Name="Air_System_Air_Manlock_point_22_Pressure_Value" Type="double" />
          <Property Name="Air_System_Air_Manlock_regulation_Pressure_Value" Type="double" />
          <Property Name="Air_System_Air_System_Pressure_Value" Type="double" />
        </EntityType>
        <!--Errors Found During Generation:
warning 6002: The table/view 'def.nfm.articulation' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
        <EntityType Name="articulation">
          <Key>
            <PropertyRef Name="DateAndTime" />
          </Key>
          <Property Name="DateAndTime" Type="datetime" Precision="0" Nullable="false" />
          <Property Name="Articulation_Angle_Horizontal_Value" Type="double" />
          <Property Name="Articulation_Angle_Vertical_Value" Type="double" />
          <Property Name="Articulation_Force_Value" Type="double" />
          <Property Name="Articulation_Pushing_in_X_Value" Type="double" />
          <Property Name="Articulation_Pushing_in_Y_Value" Type="double" />
          <Property Name="Articulation_Speed_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Delta_Pressure_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Elongation_LH_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Elongation_RH_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Elongation_Setpoint_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Elongation_Start_point_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Elongation_Virtual_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Extend_Pressure_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Force_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_High_Limit_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Low_Limit_Value" Type="double" />
          <Property Name="Articulation_Bottom_Side_Retract_Pressure_Value" Type="double" />

错误175:ADO.MySql.Data.MySqlClient'未在机器或应用程序配置文件中注册

我想你错过了MySql。包数据。尝试从Nuget包管理器重新安装包。我不确定,但这可能会解决你的问题

相关文章: