我有运行新创建的 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 Its caused because of having the project configured with "any Cpu"
希望能帮到你
这篇关于找不到与此版本兼容的实体框架数据库提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!