Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

asp.net - Entity Data Model Wizard Crash with Oracle Connection

I cannot get VS 2015 to create my EDMX file for an Oracle Connection.

I am using Visual Studio 2015 Update 3 I have installed the Oracle Developer Tools 12.1.0.2.4 I have installed Oracle Data Access and the following DLLs exist under client[user]product12.1.0clientodp.netin 2.xOracle.DataAccess.dll version: 2.121.2.0 ODAC Release 4 4Oracle.DataAccess.dll version: 4.121.2.0 ODAC Release 4 I am using the following assemblies Oracle.ManagedDataAccess Version: 4.122.1.0 Oracle.ManagedDataAccess.EntityFramework Version: 6.122.1.0 * I believe both of these are version 12.2.1100 based on the folders in which they reside in the packages folder.

There are no connections defined in the Server Explorer

My steps are as follows:

  1. Within the Solutions Explorer, Right click on project and select "Add" | "New Item..."
  2. Select Data | ADO.NET Entity Data Model | Add
  3. Select EF Designer from Database | Press Next

In the Entity Data Model Wizard:

  1. Press New Connection... (I get an warning "Failed to find the default tnsnames.ora file." I ignore and press "OK"
  2. With the Datasource as "Oracle Database (ODP.NET, Managed Driver)" I enter the credentials and specify the the other connection parameters and press "Test Connection" which SUCCEEDS.
  3. I press OK and am taken to the next page in the Entity Data Model Wizard
  4. I include sensitive data in connection string and Press Next....

WIZARD SHUTS DOWN (crashes) - NO EDMX CREATED

Any assistance in helping me troubleshoot this would be greatly appreciated.

TIA - Xavier

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Thanks to @Hong-vit pointing me in the right direction. I found the answer.

When you visit the download page for ODAC you're given a selection of version numbers.

In my case the top two were:

  • ODAC 12.2c Release 1 and Oracle Developer Tools for Visual Studio (12.2.0.1.0)
  • ODAC 12c Release 4 and Oracle Developer Tools for Visual Studio (12.1.0.2.4)

For me the top one wouldn't install. It would cut out during the installation process (thanks Oracle!) so I settled with the second one (12.1.0.2.4).

This meant that when I installed Oracle.ManagedDataAccess and Oracle.ManagedDataAccess.EntityFramework I had to select the correct version.

Not for me:

enter image description here

The one I needed

enter image description here

As you can see the version numbers (almost!) match up:

  • ODAC 12.2.0.1.0 = Oracle.ManagedDataAccess 12.2.1100
  • ODAC 12.1.0.2.4 = Oracle.ManagedDataAccess 12.1.24160719 (yay!)

I believe this is a failing on oracles behalf as it's not made clear despite their inclusion on a page long readme on which this doesn't feature. In additon the version numbers not quite being the same...but that's a rant for the blog.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...