Skip to Main Content

Oracle Developer Tools for Visual Studio

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

VS 2019 - Problems with Entity Framework wizard disappearing

User_P9EFNFeb 10 2020 — edited Mar 2 2020

I am using the shiny new ODT 19.3 via VS 2019.

When ever I try to open the Entity Framework wizard to create a model from a existing DB the wizard closes without any feedback.

Steps:

1. Add new ADO.NET Entity Data Model

2. EF Designer from database

3. Choose Your Data Connection and click Next

4. BOOM

ODT19.3Bug.PNG

I am using the following Nuget Packages:

- "Oracle.ManagedDataAccess" version="19.6.0"

- "Oracle.ManagedDataAccess.EntityFramework" version="19.6.0"

Microsoft Visual Studio Community 2019

Version 16.4.4

Are there any ODT logfiles? and if so where?

Thanks

This post has been answered by Christian.Shay -Oracle on Feb 27 2020
Jump to Answer

Comments

00c5c286-c445-4d08-80ed-c205a3487ff8

I was getting the same issue!

But I was using the following Nuget Packages:

- "Oracle.ManagedDataAccess" version "18.3"

- "Oracle.ManagedDataAccess.EntityFramework" version "18.3"

- "EntityFramework" version "6.1.3"

Microsoft Visual Studio Professional 2019 version 16.4.5

ODT 19.3 via Tools for Visual Studio 2019 version 19.3

Exact same issue you were having.

I then updated

"Oracle.ManagedDataAcces" to version "19.6"

"Oracle.ManagedDataAccess.EntityFramework" to version "19.6"

This got me a new page on Step three of the steps in OP's post, but it basically said EntityFramework is out of date.

Sorry I didn't get a screen grab.

I then updated

"EntityFramework" to version "6.4.0"

And it is now working.  Luckily this project is relatively new and I have the ability to update everything to the latest.

packages.config

<?xml version="1.0" encoding="utf-8"?>

<packages>

  <package id="EntityFramework" version="6.4.0" targetFramework="net48" />

  <package id="Oracle.ManagedDataAccess" version="19.6.0" targetFramework="net48" />

  <package id="Oracle.ManagedDataAccess.EntityFramework" version="19.6.0" targetFramework="net48" />

</packages>

User_P9EFN

Sorry, but as hard I try I can't get this to work.

I tested all kind of combinations:

EntityFramework (6.0 to 6.4) and Oracle.ManagedDataAccess (18.3 to 19.6)

Also updated the target .Net Framework to 4.8.

My package config:

pastedImage_1.png

Used also a separate fresh machine with the latest Visual Studio Version Community (16.4.5).

Maybe it has to do with the connection. I am using a connection to a ATP Cloud Instance:
pastedImage_2.png

I also tested with a normal paid cloud instance.

@"Christian.Shay -Oracle" Can someone please provide a working sample:

Oracle.ManagedDataAccess.EntityFramework connected to ATP Always Free DB Instance

Thanks

User_GR8XI

I use

Microsoft Visual Studio Professional 2019

Version 16.4.5

Oracle database 11g.

I tried EF 6.1.3 , 6.2 , .6.4

- "Oracle.ManagedDataAccess"  from version "12." to the newest

- "Oracle.ManagedDataAccess.EntityFramework" from version "12.x"  to the newest.

Many combinations.  All of them don't work .

Any ideas what to do ?

Graham Arthur

I'm having the same problem. We are developing a web application in VS2013 and are moving over to VS2019 and when I try and go to the .edmx diagram, right click and select 'Update Model From Database', select the connection and click 'Next' it tries to open a screen to select a version of Entity Framework, but then crashes. I've got the following

VS2019 Professional 2019 Version 16.4.5

Entity Framework Version 6.0.0.0

Oracle Developer Tools 19.3 which contains :-

Oracle Managed Data Access Version 4.122.19.1

Oracle Managed Data Access Entity Framework Version 6.122.19.1

We are using Oracle Version 12.1 as the database

I've tried deleting the old version of the Oracle packages from VS2013 and just having the ones from VS2019, changing the machine.config file, changing the web.config, changing the app.config, but nothing seems to be working. Could someone at Oracle please look into this, because there is clearly a major issue with this and it is going to be affecting a lot of people

User_P9EFN

I also tested ODT 19.3 + Visual Studio 2017.
With the same result: The entity framework wizard disappears next to the "Choose Your Data Connection" step.

Please Oracle, help us and provide a solution!

Christian.Shay -Oracle

Hi all,

Thanks for all your help raising this issue. We are working with Microsoft to try to resolve it. As soon as I have a workaround or more information, I will post again here to let you know.

Thanks,

Christian

4141867 wrote:

I am using the shiny new ODT 19.3 via VS 2019.

When ever I try to open the Entity Framework wizard to create a model from a existing DB the wizard closes without any feedback.

Steps:

1. Add new ADO.NET Entity Data Model

2. EF Designer from database

3. Choose Your Data Connection and click Next

4. BOOM

ODT19.3Bug.PNG

I am using the following Nuget Packages:

- "Oracle.ManagedDataAccess" version="19.6.0"

- "Oracle.ManagedDataAccess.EntityFramework" version="19.6.0"

Microsoft Visual Studio Community 2019

Version 16.4.4

Are there any ODT logfiles? and if so where?

Thanks

Hi,

Could you please let me know the following?

  1. Is the Server Explorer connection using TNS alias or Basic (ezconnect) for the connection ?

  2. If the Server Explorer connection is using TNSAlias, is it using tnsnames.ora from the default location (%USERPROFILE%\Oracle\network\admin) ? Or is it in some other location?

User_P9EFN

Hi Christian, thanks for helping out.

1) Is the Server Explorer connection using TNS alias or Basic (ezconnect) for the connection ?

- It is using "TNS Alias":

pastedImage_2.png

_2) If the Server Explorer connection is using TNSAlias, is it using tnsnames.ora from the default location (%USERPROFILE%\Oracle\network\admin) ? Or is it in some other location?
- As u can see it uses: "%USERPROFILE%\_Oracle\network\admin\AlwaysFreeDB2"
There is a tnsnames.ora with the following connection string:

alwaysfreedb2_high = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.eu-frankfurt-1.oraclecloud.com))(connect_data=(service_name=aklhtl00etaacqi_alwaysfreedb2_high.atp.oraclecloud.com))(security=(ssl_server_cert_dn="CN=adwc.eucom-central-1.oraclecloud.com,OU=Oracle BMCS FRANKFURT,O=Oracle Corporation,L=Redwood City,ST=California,C=US")))

I also tested the same setup with an Oracle 11g instance using EZConnect and it is working.

As far as I know u can't use an ATP instance with "EZConnect"?

Thanks,
Andreas

Christian.Shay -Oracle
Answer

Thank you!

We have one workaround for this issue now - if the TNSNAMES.ORA and wallet files are located in the default location this error will not occur.

On installation, the default location is %USERPROFILE%\Oracle\network\admin. The default is also changeable in the options page.

So, you can do one of two things:

1) Backup contents of %USERPROFILE%\Oracle\network\admin, then delete the contents of this directory.

2) Copy the tnsnames.ora, sqlnet.ora and wallet files to this location

3) Restart Visual Studio

Or

1) Go to VS menu, Tools->Options->Oracle Developer Tools ->Connection Configuration and set Tns admin location to the location you want to connect from. Also set wallet file location as well.

2) Restart Visual Studio

Marked as Answer by User_P9EFN · Feb 27 2020
User_P9EFN

Hi Christian,

Thank you for providing this workaround. It works just fine.
I tested some simple scenarios (create & update model from ATP database) without any problems.

The same applies to ODT 19.6 for Visual Studio 2017.

Thanks again and best regards

Andreas

Christian.Shay -Oracle

4141867 wrote:

Hi Christian,

Thank you for providing this workaround. It works just fine.
I tested some simple scenarios (create & update model from ATP database) without any problems.

The same applies to ODT 19.6 for Visual Studio 2017.

Thanks again and best regards

Andreas

Hi,

I need to add another comment:

The workaround I provided will avoid the crash and allow the EF model to be added to your project, but please be aware that ODP.NET in that project will not automatically be able to find the location of your tnsnames.ora and wallet files. You will need to set TNS_ADMIN and (if needed) WALLET_LOCATION in the config file (eg app.config, or web.config) or include the TNSNAMES/SQLNET.ORA/WALLET/etc in the root of your project. In future releases these values will be set in the ODP.NET connection string automatically and you will not have to do this.

User_1SUJD

The key for me was when I created the Data Connection in Server Explorer, use the Oracle Unmanaged Driver. Specify TNS Alias, point to your .ora file (crucial). Then, and this is what kept causing problems, is to click Filters, and add the schema needed to see the tables. Leave the default schema, and ADD the schema you need. You have to hit the Update button in order for this to take effect!!! If all goes well you should see the tables in the Server Explorer Data Connection.
Now go to your solution and add the ADO.NET Entity Data Model, EF Designer from database. You should get a dialog that holds the Data Connection we created above. Choose that. I chose to include the sensitive data in the connection string.
Now when you go to the window that shows the tables they automagically appear!
Hope this helps someone someday. I was stuck on this off and on for a couple weeks.

User_CF9GJ

I'm having this problem.
I've tried the work around, and the same issue persists. The wizard just keeps going back.
I've tried Basic, TNS_Alias, advanced connections. all the same.

Losing days of productivity over this.

Any insight as to why it's happening?

User_YGART

Same here. I'm using Basic, and the work-around suggested in this thread did not help.
My exact issue is that the Wizard restarts after briefly showing step 5, as seen here: https://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/EntityFrameworkOBE_2/EntityFrameworkOBE.html.
Please advice.

mos_379

Unfortunately does not work with latest ODT and visiual studio 2019 Ent

What version of ODP.NET are you using?
Did you also use the workaround in this thread:
https://community.oracle.com/tech/developers/discussion/4185095/problems-with-entity-framework-wizard-disappearing#latest

mos_379

I used ODTforVS2019_193300
and yes I tried the referenced workaround.
For anyone else stumbling here, I ended up with using the EF Core Power Tools to work around this problem.
https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools

User_4NUX3

Hello
I have a similar problem
In visual studio 2019
I try to add a new
ado.net Entity data model but i have this error
Untitled.pngI try various combination of entity framework version and oracle.manageddataaccess versions
but the result is the same

in this case
entity:6.0.0
Oracle.managedDataacess:19.6.0

User_MCFRF

I had skip/missing problem on VS 2019 (16.11.21). With Oracle.ManagedDataAccess:21.8.0 and Oracle.ManagedDataAccess.EntityFramework: 21.5.0.
I reverted Oracle.ManagedDataAccess and Oracle.ManagedDataAccess.EntityFramework to latest 19.xx.y versions.
After that Entity Data Model Wizzad works again.
I have Oracle 19c Database client installed on my computer.

user8879148

Thank you very much @User_MCFRF, it works.

1 - 20

Post Details

Added on Feb 10 2020
20 comments
11,747 views