首页 > 解决方案 > 在 App.Config 文件中找不到名为“Inventory_ManagementEntities”的连接字符串”

问题描述

我在打开我的应用程序主页设计器时遇到了这个错误。在 app.config 文件中,我可以看到名为“Inventory_ManagementEntities”的实体。 问题快照

这是我的 app.config 文件的代码

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings>
    <add name="Inventory_ManagementEntities" connectionString="metadata=res://*/Base_Table.csdl|res://*/Base_Table.ssdl|res://*/Base_Table.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=MOHSINALVI\TESTSERVER;initial catalog=Inventory_Management;user id=sa;password=telco_123;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v13.0" />
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>
</configuration>

标签: c#wpfwinformsentity-framework

解决方案


您有已配置但最终未使用的功能要永久删除它们,您需要访问链接查看显示调用堆栈 并删除该功能。 显示链接错误


推荐阅读