CaptainMorgan
CaptainMorgan

Reputation: 1253

ODP.NET Managed Driver does not show up for Visual Studio 2015

I have Visual Studio 2015 Enterprise and I want to get a connection to an Oracle database. I've installed the 32bit tools: http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html

and the 64 bit tools: http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html

When I try to add a data connection in Visual Studio, I don't see ODP.NET managed driver or the OPD.NET Unmanaged driver in the data provider list.

Any help would be appreciated.

Upvotes: 1

Views: 2984

Answers (1)

Safari Jones
Safari Jones

Reputation: 500

ODP.NET's installer hasn't been updated to Visual Studio 2015 as of today (check the date on this post, the latest currently is 12.1.0.2.1/Dec 2014). The actual driver appears to work fine, it is the installer which is the problem as far as I've been able to tell.

I have two workarounds for the installer, neither of them are pleasant.

Workaround #1:

  • Uninstall Visual Studio 2015, then remove its registry keys from HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0
  • Install Visual Studio 2013. Install ODP.NET w/Visual Studio Tools on 2013.
  • Now reinstall Visual Studio 2015, the VS 2015 installer will import the ODP.NET keys from 2013's hives, and you'll have a working ODP.NET installation on 2015.

Workaround #2: This requires that Visual Studio 2013 is NOT installed, 2015 only. We're going to trick the ODP.net installer into installing onto 2015 for us.

  • Make sure Visual Studio 2015 is installed and 2013 is not.
  • Export to file ("12.0 original.reg"): HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0
  • Export to file ("14.0 original.reg"): HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0
  • Copy the 14.0 export ("14.0 replaced.reg") and search/replace "14.0" to "12.0", and import (it will populate Visual Studio 2013's hives with 2015's content.
  • Install ODP.net w/Visual Studio Tools. It will claim it is installing on VS 2013.
  • Export again to new file ("12.0 updated.reg"):
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0
  • Run a differential on the old 12.0 ("12.0 original.reg") and the new 12.0 ("12.0 updated.reg")
  • Replace "12.0" with "14.0"
  • Import any new/different keys into the 14.0 hives (2015).
  • Delete: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0
  • Import the original 12.0 export ("12.0 original.reg") to reset it.

Use at your own risk, but I've used both methods and it works. I will reinstall when a new ODP.net is released (since this method could have artifacts), but broadly speaking right now it is either this or just not using 2015 with ODP.net.

Upvotes: 1

Related Questions