An Entity Framework database provider compatible with this version could not be found(找不到与此版本兼容的实体框架数据库提供程序)
问题描述
我有运行新创建的 WebAPI 2 项目的 Visual Studio Professional 2015.我想使用实体框架(首先来自现有数据库的代码)从数据库创建数据模型.所以我从oracle下载了这个.
I have Visual Studio Professional 2015 running a newly created WebAPI 2 project. I wanted to create a data model from database using entity framework (code first from existing database). So I downloaded this from oracle.
ODAC 12.2c 第 1 版和适用于 Visual Studio 的 Oracle 开发人员工具 (12.2.0.1.0)
ODAC 12.2c Release 1 and Oracle Developer Tools for Visual Studio (12.2.0.1.0)
安装后,我使用托管驱动程序成功测试连接到数据库,并继续执行 EF 向导.但最后我得到这个错误
After installation I successfully tested connected to the database using Managed driver, and proceed through the EF wizard. But at the end I get this error
我尝试了托管和非托管驱动程序.我也尝试添加对这些库的引用
I tried both Managed and Unmanaged drivers. I also tried adding references to these libraries
Oracle.ManagedDataAccessOracle.ManagedDataAccess.EntityFrameworkOracle.DataAccess.EntityFrameworkOracle.DataAccess
Oracle.ManagedDataAccess Oracle.ManagedDataAcces.EntityFramework Oracle.DataAccess.EntityFramework Oracle.DataAccess
我检查了项目正在使用的实体框架版本,它说它使用的是最新的 6.1.3
I check my version of Entity Framework the project is using and it says its using the latest 6.1.3
推荐答案
从 Nuget 添加此引用后:
after adding this references from Nuget:
Oracle.ManagedDataAccess Oracle.ManagedDataAcces.EntityFramework Oracle.DataAccess.EntityFramework Oracle.DataAccess
Oracle.ManagedDataAccess Oracle.ManagedDataAcces.EntityFramework Oracle.DataAccess.EntityFramework Oracle.DataAccess
您必须在 x86 中编译项目,然后使用向导重试.我们在我的办公室多次遇到您的问题,我认为这是因为项目配置了任何 Cpu"
you have to compile the project in x86 and try again with the wizard. We have had your problem at my office several times, and I think It´s caused because of having the project configured with "any Cpu"
希望能帮到你
这篇关于找不到与此版本兼容的实体框架数据库提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:找不到与此版本兼容的实体框架数据库提供程序
基础教程推荐
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 带更新的 sqlite CTE 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
