Erreur db2 avec EFcore 3.1: Method not found: 'System.String System.AppDomainSetup.get_LicenseFile()'

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for DB2
Post Reply
reredev
Posts: 3
Joined: Wed 12 Feb 2020 16:27

Erreur db2 avec EFcore 3.1: Method not found: 'System.String System.AppDomainSetup.get_LicenseFile()'

Post by reredev » Thu 13 Feb 2020 12:00

Bonjour,
j'ai essayé dans un projet (projet console) d'utiliser devart.data.db2 avec EFcore 3.1, j'ai eu cette erreur lors de la compilation:
Méthode introuvable: 'System.String System.AppDomainSetup.get_LicenseFile ()'

Code dbconext:

classe DbContextExEx : DbContext
{
public DbSet <Article> Article {get; ensemble; }

/ * public DbContextEx (options DbContextEx): base (options)
{

} * /

protected override void OnConfiguring (DbContextOptionsBuilder optionsBuilder)
{

optionsBuilder.UseDB2 (@ "server = xxxx: 446; Database = xxxx; UserID = xxxx; Password = xxxx ; ");
}


}
}

code console:
var lis = _dbContext.Article.FromSqlRaw <Article> ("SELECT ....... '") .ToListAsync ();


EFcore 3.1
devart.data.db2.entity.efcore: C: \ Program Files (x86) \ Devart \ dotConnect \ DB2 \ Entity \ EFCore3 \ Devart.Data.DB2.Entity.EFCore.dll
devart.data.db2: C: \ Program Files (x86) \ Devart \ dotConnect \ DB2 \ Devart.Data.DB2.dll
devart.data: C: \ Program Files (x86) \ Devart \ dotConnect \ DB2 \ Devart.Data.dll


je précise c'est db2 as400 avec EF.core 3.1
?????? ??????????????????????????????????????????????????? ??????????????

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

Re: Erreur db2 avec EFcore 3.1: Method not found: 'System.String System.AppDomainSetup.get_LicenseFile()'

Post by Shalex » Fri 14 Feb 2020 10:03

Please set Target framework of your project to .NET Framework. That is the only framework supported by dotConnect for DB2.

Post Reply