0

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 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

This works. If you install nuget, you still need to add the DLL to GAC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.