12

Having installed managed ODP.NET on my computer, the ODP.NET Managed Driver does not appear inside the Choose Data Source dialog in Visual Studio 2013 Professional.

This is how it should look like:

enter image description here

This is how it actually looks on my machine:

enter image description here

I've followed the steps described in the "An Easy Drive to .NET" article on the Oracle website.

I've also installed the Oracle Developer Tools for Visual Studio. Still no managed driver to select.

My question:

Is there anything I forgot to do in order to make the data provider appear?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
  • 1
    If you are using Visual Studio 2017 Community edition, please upgrade to version 12.2.0.1.1 or later. That is the first version that works with VS 2017 CE: http://www.oracle.com/technetwork/topics/dotnet/downloads/odacmsidownloadvs2017-3806459.html – Christian Shay Apr 12 '18 at 20:01

5 Answers5

9

The generic answer to this question is "(Re)install 'Oracle Developer Tools for Visual Studio' (ODT)". Simply getting ODP.NET from Nuget or from other sources is not enough to take advantage of Visual Studio integration. You must install ODT also.

Download "ODTwithODAC": http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html

Update 4/2018: If you are using Visual Studio 2017 Community edition, please upgrade to version 12.2.0.1.1 or later. That is the first version that works with VS 2017 CE: http://www.oracle.com/technetwork/topics/dotnet/downloads/odacmsidownloadvs2017-3806459.html

As you noticed, sometimes installations get munged. So if you do not see the driver in the dialogs or are getting generic (non-oracle ORA-) errors when you try to use features then you should reinstall ODT.

Christian Shay
  • 2,570
  • 14
  • 24
  • 2
    Perfect! This was a life saver! I spent a full day installing/uninstalling Oracle clients and Oracle for VS to no avail. I downloaded and installed the ODTwithODAC from your link and after getting VS to point to the correct tnsnames.ora location it finally worked. BTW, I tried the registry change mentioned in the accepted answer and that did not work for me. – Caverman Feb 16 '17 at 16:10
  • I did Install and resinstall the latest version: [Released July 6, 2017] and still doesn't show. This is a fresh install anyway, never use oracle on this pc. Using VS2017 Community Edition. Is there a check list to follow to help me install it so I can use EF with oracle? – Juan Carlos Oropeza Sep 06 '17 at 19:54
  • Juan, that's a whole new problem. As of Sept 2017, VS 2017 Community Edition doesn't work with Oracle Developer Tools for Visual Studio. We plan to release another version soon that will address this. In the meantime you will have to use one of the other editions. – Christian Shay Sep 13 '17 at 20:58
  • Update: If you are using Visual Studio 2017 Community edition, please upgrade to version 12.2.0.1.1 or later. That is the first version that works with VS 2017 CE: http://www.oracle.com/technetwork/topics/dotnet/downloads/odacmsidownloadvs2017-3806459.html – Christian Shay Apr 12 '18 at 20:01
6

Open your Registry editor and check if RegKey HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed exists. It contains only the (Default) value with location of your Oracle.ManagedDataAccess.dll.

Add the key in case it is missing, example:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed]
@="c:\\oracle\\product\\12.1\\odp.net\\managed\\common"

You can also try the Oracle config scripts at {ORACLE HOME}\odp.net\managed\x64\configure.bat and {ORACLE HOME}\odp.net\managed\x86\configure.bat, they should do the same

Then check your compile options whether you selected target Framework at least to .NET Framework 4.

Update for Release 12.2

Key odp.net.managed seems to be used in old version 12.1. Latest release uses Oracle.ManagedDataAccess:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess]
@="C:\\oracle\\product\\12.2\\Client_x64\\odp.net\\managed\\common"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess.EntityFramework6]
@="C:\\oracle\\product\\12.2\\Client_x64\\odp.net\\managed\\common\\EF6"
Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
3

While Wernfried posted his answer I tried at the same time the following approach:

  1. Uninstall any previously installed Oracle packages/drivers.
  2. Restart Visual Studio.

After these steps, the drivers were present:

enter image description here

I'm still not 100% sure, why a simple uninstall fixes something.

Community
  • 1
  • 1
Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
1

Old post but same issue. THe root cause is - i think - if you have VS 2022 installed the ODT for VS 2017 or 2019 does not install properly. I had to uninstall all versions of VS, reinstall VS 2017, reinstall ODTwithODAC183. Ensure that it can actually find the latest version of VS 2017 - I used the Visual Studio installer and it installed the latest version of VS 2017 Pro. I think that made a difference too. It looks like otherwise the installer won't find VS 2017 properly (if 2022 is installed) and the whole thing is fubar.

To test if it's installed correctly, add a entity data model and you should be able to see the oracle option in the data source list.

Rob
  • 2,363
  • 7
  • 36
  • 54
0

I has same error. Since I installed vs2015 Update 3.