Page 1 of 1

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

Posted: Mon 15 Jan 2018 12:23
by jaydip
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?

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

Posted: Wed 17 Jan 2018 15:44
by Shalex
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.

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

Posted: Mon 22 Jan 2018 12:17
by jaydip
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...

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

Posted: Tue 23 Jan 2018 18:43
by Shalex
Current implementation of dotConnect for Oracle includes two versions of assemblies:

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

Posted: Tue 23 Jan 2018 18:44
by Shalex
Please use the .NET Standard (.NET Core) Devart.* assemblies.

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

Posted: Thu 19 Jul 2018 07:56
by MHieu
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?

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

Posted: Thu 19 Jul 2018 13:52
by Shalex
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.

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

Posted: Tue 24 Jul 2018 10:51
by MHieu
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

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

Posted: Wed 25 Jul 2018 18:25
by Shalex
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

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

Posted: Fri 27 Jul 2018 04:48
by MHieu
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.