Support > Forums > OpenBots Studio > The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

TI Distribucion

  • Reporter
  • Calender Icon July 06,2023 at 2:55 AM

Hello,

We are facing a issue since we upgrade the open studio to version 2.0.0.0. The problem is that when we try to insert a datatable using oraclebulkcopy inside a sniped, the Snippet shows the following error:

The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

The script inside the snippet is:

OracleConnection oracleConnection = new OracleConnection(vConexion); oracleConnection.Open(); OracleBulkCopy bulkCopy = new OracleBulkCopy(oracleConnection); bulkCopy.DestinationTableName = "Datos"; bulkCopy.WriteToServer(vTablaDatos); oracleConnection.Close();

It's important to mention that scrjipt worked fine in previous open studio versio.

Thanks for help.

This forum has 317 topics, 687 replies, and was last updated 4 months ago by Nataly Alvarado...

Poornima Malviya

  • Participant
  • Calender Icon July 10,2023 at 6:51 PM

Hi ti-distribucion,

Please note that according to Microsoft's documentation, the OracleConnection has been deprecated. Documentation link: https://learn.microsoft.com/en-us/dotnet/api/system.data.oracleclient.oracleconnection?view=netframework-4.8.1

Studio 1.8.6.x was built in an older version of .Net Framework (.Net Framework 4). The latest Studio v2.0.0 is built in .Net Framework 6, which is why the code was working in the past version. It is no longer supported in the latest version.

TI Distribucion

  • Participant
  • Calender Icon July 10,2023 at 4:35 PM

Hello,

Any updates?

Thanks

You are not authorized to reply, please click here to login and add your reply to this topic.