Managed ODP.NET driver does not show up in Data Source dialog

前端 未结 4 1357
臣服心动
臣服心动 2020-11-28 15:11

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 2

相关标签:
4条回答
  • 2020-11-28 15:42

    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"
    
    0 讨论(0)
  • 2020-11-28 15:46

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

    • solve Reinstall Oracle Developer Tools for Visual Studio 2015. http://www.oracle.com/technetwork/topics/dotnet/downloads/odacmsidownload-2745497.html

    • ref https://community.oracle.com/thread/648192

    0 讨论(0)
  • 2020-11-28 15:49

    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.

    0 讨论(0)
  • 2020-11-28 15:51

    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.

    0 讨论(0)
提交回复
热议问题