3

I recently installed Oracle Developer Tools for Visual Studio. Now I'm getting this error when I open Visual Studio. Can someone else explain me hoe to get rid of this message.

Microsoft Visual Studio

Oracle Data Provider for .NET has been installed without a machine-wide configuration. However, a version of Oracle Data Provider for .NET has been detected in the Global Assembly Cache which may be incompatible. Please remove Oracle Data Provider for .Net from Global Assembly Cache an restart Visual Studio

[OK]

Community
  • 1
  • 1
  • Similar: https://stackoverflow.com/questions/33355114/how-to-remove-net-assembly-dlls-from-server-gac/49040081#49040081 – vapcguy Feb 28 '18 at 23:05

2 Answers2

2

Do not forget C:\Windows\Microsoft.NET\assembly folders. I've solved problem by deleteing folders

  • Oracle.ManagedDataAccess (GAC_64 folder)
  • Oracle.DataAccess.resources (GAC_MSIL folder)
  • Oracle.DataAccess (GAC_32 folder)
1

I did a lot of stuff which didn't helped. But one thing did.: open visual Studio Command prompt in admin mode https://learn.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs

there you have to use gacutil /l to list all assemblies

Then delete every entry which includes oracle:

gacutil /u [assembly name]

you can get the assembly name out of the list before. Just use the term before the first comma (e.g. Oracle.ManagedDataAccess)

After that I opened Visual Studio and the error message disappeared. What happened was, that in the machine.config were entries which I needed to delete. Which one you have to delete shows the error while you debugg the code.

Hope it will help.

Egg Mac
  • 11
  • 1
  • Sometimes you get an error when you try this: Windows Installer is a dependency. If so, you have to also remove it from `HKEY_CURRENT_USER\Software\Microsoft\Installer\Assemblies\Gl‌​obal` & `HKEY_LOCAL_MACHINE\Software\Classes\Installer\Assemblies\Glo‌​bal`, then do the `gacutil -u` command. I didn't have to go to the HKCU location-but it was at the HKLM location. Then uninstalled & re-installed the Oracle Developer Tools for Visual Studio, to be safe. Then worked https://stackoverflow.com/questions/30407213/oracle-net-manageddataaccess-error-could-not-load-type-oracleinternal-common/35089333 – vapcguy Feb 28 '18 at 22:42
  • I ran the `gacutil /u` command against `Oracle.DataAccess` at first but the message kept appearing. I then ran it again against `Oracle.ManagedDataAccess` and `Oracle.DataAccess.resources` restarted Visual Studio and that fixed the error. – Jeff Mergler Apr 20 '21 at 00:46