[英]'No Entity Framework provider found' for EF 6 and SQLite 1.0.96.0
[英]No Entity Framework Provider Found
我有两个月前开始的项目! 我正在使用[LASG]: https : //layerguidance.codeplex.com/体系结构作为我的解决方案! 我收到了“没有为ADO.net提供程序找到名称不变的名称'System.Data.SqlClient'的实体框架提供程序”,因此我在解决方案中工作得很好
应用程序配置文件包含提供程序的完整块
这是我的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=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<add name="MASTERGESTION" connectionString="Data Source=ZZZZ\ZZZZZ;Initial Catalog=XXXXXX;User ID=YY;Password=ZZZZZZ" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
我在构建解决方案后将项目复制到其他计算机上,它可以正常启动并且没有提供程序错误
我重建了解决方案很多次,我没有响应就手动重新添加了引用!
有什么帮助吗? 我无缘无故地放松了六个小时
defaultConnectionFactory
不应为:
System.Data.Entity.Infrastructure.LocalDbConnectionFactory
改为:
System.Data.Entity.Infrastructure.SqlConnectionFactory
我认为它可以在第二台计算机上正常工作,因为它已安装了LocalDb,而第一台计算机却没有。
尝试代替
User ID=YY;Password=ZZZZZZ
使用
Integrate Security=True
还添加<context>
<context type="tablename, databasename">
<databaseInitializer type="databasename.Migrations.tablenameInitializer, databasename" />
</context>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.