I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
jaydip
Posts: 2
Joined: Mon 15 Jan 2018 12:18

I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by jaydip » Mon 15 Jan 2018 12:23

Hello,

I am using Devart Enterprise - Free trail version for my .Net Core 2 project to connect to Oracle. I have downloaded the devart oracle client and added following DLLs in references : Devart.Data and Devart.Data.Oracle.
I am getting below error when trying to execute one of test case:
Message: System.MissingMethodException : Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()'.
from below code:

Code: Select all

 var dbConnection = OracleClientFactory.Instance.CreateConnection();
Any inkling on what's going wrong?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by Shalex » Wed 17 Jan 2018 15:44

1. Right click your project in Solution Explorer > Properties and tell us your value of Target framework.
2. Run your code in the debug mode, navigate to Debug > Windows > Modules and specify the full paths of loaded Devart.Data.dll and Devart.Data.Oracle.dll.

jaydip
Posts: 2
Joined: Mon 15 Jan 2018 12:18

Re: I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by jaydip » Mon 22 Jan 2018 12:17

1. Answer of your first question was already there in my post. It's .NET Core 2.0
2. I have executed the downloaded executable "dcoracle.exe" and added reference of "Devart.Data.Oracle" in my project from C:\Program File(*86)\Devart...

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by Shalex » Tue 23 Jan 2018 18:43

Current implementation of dotConnect for Oracle includes two versions of assemblies:

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by Shalex » Tue 23 Jan 2018 18:44

Please use the .NET Standard (.NET Core) Devart.* assemblies.

MHieu
Posts: 3
Joined: Thu 19 Jul 2018 07:46

Re: I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by MHieu » Thu 19 Jul 2018 07:56

I've had the same error when running my first migration.
My project has target framework of netcoreapp2.1 and it's referencing Devart.Data.Oracle and Devart.Data.Oracle.Entity.EFCore from .NET Standard (.NET Core) Devart.* assemblies (latest version 9.6.540).
Is there any way to get around this problem?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by Shalex » Thu 19 Jul 2018 13:52

Please run your code in the debug mode, navigate to Debug > Windows > Modules and specify the full paths of loaded Devart.Data.dll, Devart.Data.Oracle.dll and Devart.Data.Oracle.Entity.EFCore.dll.

MHieu
Posts: 3
Joined: Thu 19 Jul 2018 07:46

Re: I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by MHieu » Tue 24 Jul 2018 10:51

The full path of Devart.Data.Oracle.Entity.EFCore.dll in debug mode is:
C:\Users\USER\Desktop\AbpWithOracle\aspnet-core\src\Oracle.Web.Host\bin\Debug\netcoreapp2.1\Devart.Data.Oracle.Entity.EFCore.dll

Devart.Data.dll and Devart.Data.Oracle.dll were not loaded.

The added references:
Image

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by Shalex » Wed 25 Jul 2018 18:25

Your project references Devart.* assemblies provided with installation ( \Program Files (x86)\Devart\dotConnect\Oracle\ ) that are .NET Framework assemblies.

Assuming that your project's setting is <TargetFramework>netcoreapp2.1</TargetFramework>, you should remove the existing Devart.* references, open Package Manager Console and execute:
PM> install-package devart.data.oracle.efcore

After this, the paths of loaded Devart.* assemblies should be:
  • C:\Users\%YourUserName%\.nuget\packages\devart.data\5.0.1982\lib\netstandard2.0\Devart.Data.dll
  • C:\Users\%YourUserName%\.nuget\packages\devart.data.oracle\9.6.558\lib\netstandard2.0\Devart.Data.Oracle.dll
  • C:\Users\%YourUserName%\.nuget\packages\devart.data.oracle.efcore\9.6.558\lib\netstandard2.0\Devart.Data.Oracle.Entity.EFCore.dll

MHieu
Posts: 3
Joined: Thu 19 Jul 2018 07:46

Re: I am getting the error Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()

Post by MHieu » Fri 27 Jul 2018 04:48

Shalex wrote: Wed 25 Jul 2018 18:25 Your project references Devart.* assemblies provided with installation ( \Program Files (x86)\Devart\dotConnect\Oracle\ ) that are .NET Framework assemblies.

Assuming that your project's setting is <TargetFramework>netcoreapp2.1</TargetFramework>, you should remove the existing Devart.* references, open Package Manager Console and execute:
PM> install-package devart.data.oracle.efcore

After this, the paths of loaded Devart.* assemblies should be:
  • C:\Users\%YourUserName%\.nuget\packages\devart.data\5.0.1982\lib\netstandard2.0\Devart.Data.dll
  • C:\Users\%YourUserName%\.nuget\packages\devart.data.oracle\9.6.558\lib\netstandard2.0\Devart.Data.Oracle.dll
  • C:\Users\%YourUserName%\.nuget\packages\devart.data.oracle.efcore\9.6.558\lib\netstandard2.0\Devart.Data.Oracle.Entity.EFCore.dll
Thank you. It works.

Post Reply