gilpach
gilpach

Reputation: 1385

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]\product\12.1.0\client\odp.net\bin 2.x\Oracle.DataAccess.dll version: 2.121.2.0 ODAC Release 4 4\Oracle.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

Upvotes: 16

Views: 10527

Answers (5)

dvque
dvque

Reputation: 499

I have had the same problem when I was trying to connect Oracle Entity Framework with Visual Studio 2017.

After install and unistall several times differents version. The build that better works for me is:

Oracle Developer Tools for Visual Studio 2017 (ODTv2017) v12.2.1200

Oracle.ManagedDataAccess v12.2.1100

Oracle.ManagedDataAccess.EntityFramework v12.2.20190115

EntityFramework .NET v6.3.0

I think that having similar versions in Oracle packages is very important for good performance.

Upvotes: 1

Chihuahua Enthusiast
Chihuahua Enthusiast

Reputation: 1580

I had the same issue - I hope I can help fellow Googlers having the unfortunate task of connecting Oracle and Visual Studio.

I followed the steps and still got crashes - because I was using VS2017 (I understand that the questions is tagged VS2015). You'll need to install the VS2017 ODAC Client. Thankfully, this one actually does something when you begin the installation. The installer in the link on the accepted answer will only work for VS2015.

The most recent version (as of this time of writing) of ODP.NET is 18.3, which can be installed through NuGet (Oracle.ManagedDataAccess.EntityFramework). Follow these steps on Oracle's website and you'll be setup.

...Or so you think. I got the same error as in this stack overflow question, where it won't go past the Entity Data Model Wizard.

I applied every configuration in the selected answer, but it still wouldn't work. When I downgraded my Oracle.ManagedDataAccess.EntityFramework from 18.3.0 to 12.2.1100, I could finally create my models!

Upvotes: 3

Hong Van Vit
Hong Van Vit

Reputation: 2986

I have the same bug. I fixed it successfully by follow this step:

On your project Right click -> Select Manage NuGet packages on Browse tab input oracle. You will see Oracle.ManagedDataAccess.EntityFramework. Select version of oracle you have installed. This should be 12.1.2400. Install it, you are done

Upvotes: 12

m.edmondson
m.edmondson

Reputation: 30922

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.

Upvotes: 24

J. Chomel
J. Chomel

Reputation: 8395

It looks like someone here had similar issue: He add to change implementation somehow.

[in this ]case a View (valid and worked) caused the crashes. After changing the implementation without using that view it worked (more or less).

What I advise is you proceed step by step, only importing one object for the first time you test the wizard, then only simple table, then add procedures, views...

Upvotes: 0

Related Questions