0
votes

I am trying to create some tables on an Oracle Database by executing migrations on Visual Studio, but im getting the following error in Package Manager Console:

Type is not resolved for member 'Oracle.ManagedDataAccess.Client.OracleException,Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342'.

This is my connection string:

 <connectionStrings>
    <add name="APSDashboardv2.Properties.Settings.Setting" connectionString="DATA SOURCE=xxxxxxxx;PASSWORD=xxxxxx;USER ID=xxxxxx"
      providerName="Oracle.ManagedDataAccess.Client" />
  </connectionStrings>

Strangely, tables were created but I cannot make a Select to see data, and whenever it try to make this select I get the following message:

SQL Error: ORA-00942: table or view does not exist 00942. 00000 - "table or view does not exist"

Anyone could help me with this?

1

1 Answers

0
votes

You need to register Oracle.ManagedDataAccess.dll to GAC. Firstly, make a folder on your drive and copy the Oracle.ManagedDataAccess.dll to the folder, open command prompt there(Shift+Right Click>>Open Command Prompt Here). And Then copy and paste the following command and press enter. If you found "Assembly successfully added to the cache" message and your problem solved :). Restart Visual Studio and update-database again.

Command is here:

"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe" /i Oracle.ManagedDataAccess.dll

Code Snippet Here