ASP:Net Core 2 Error creating DB2Connection

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for DB2
Post Reply
peterlapalus
Posts: 1
Joined: Wed 22 Aug 2018 08:45

ASP:Net Core 2 Error creating DB2Connection

Post by peterlapalus » Wed 22 Aug 2018 08:54

Hi Im running a ASP.Net Core 2 project and get this error when creating a DB2Connection.

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Diagnostics.PerformanceCounter, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.'

Please advice.

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

Re: ASP:Net Core 2 Error creating DB2Connection

Post by Shalex » Thu 23 Aug 2018 10:28

dotConnect for DB2 doesn't include .NET Core (and ASP.NET Core) assemblies. There is no any timeframe for this feature at the moment. We will notify you about the progress.

The .NET Core support is currently available in the following dotConnect providers only:
* dotConnect for Oracle -> https://www.devart.com/dotconnect/oracle/
* dotConnect for MySQL -> https://www.devart.com/dotconnect/mysql/
* dotConnect for PostgreSQL -> https://www.devart.com/dotconnect/postgresql/
* dotConnect for SQLite -> https://www.devart.com/dotconnect/sqlite/

likemike91
Posts: 2
Joined: Wed 10 Oct 2018 10:12

Re: ASP:Net Core 2 Error creating DB2Connection

Post by likemike91 » Wed 10 Oct 2018 10:14

I have the same error but I'm targeting Oracle and use the latest version of dotConnect for Oracle (9.6.597).
We host the API inside a Linux Docker container.
Could that be an issue?

likemike91
Posts: 2
Joined: Wed 10 Oct 2018 10:12

Re: ASP:Net Core 2 Error creating DB2Connection

Post by likemike91 » Wed 10 Oct 2018 10:44

Okay I figured it out already.
I referenced the wrong versions of DevArt.Data and DevArt.Data.Oracle because I used the ones which come with the setup of DevArt dotconnect for Oracle.
But I had to use the ones coming via the NuGet package.

jwp
Posts: 1
Joined: Fri 22 Mar 2019 12:49

Re: ASP:Net Core 2 Error creating DB2Connection

Post by jwp » Fri 22 Mar 2019 13:04

Is there any update on this? I am also encountering this error when attempting to scaffold a DB2 database using the following tutorial found here. My project is a .Net Core 2.1 Console application with the following references.
  • Devart.Data
    (C:\Program Files (x86)\Devart\dotConnect\DB2\Devart.Data.dll)
  • Devart.Data.DB2.Dll
    (C:\Program Files (x86)\Devart\dotConnect\DB2\Devart.Data.DB2.dll)
  • Devart.Data.DB2.Entity.EFCore
    (C:\Program Files (x86)\Devart\dotConnect\DB2\Entity\EFCore2\Devart.Data.DB2.Entity.EFCore.dll)
  • Microsoft.EntityFrameworkCore.Tools v2.2.3

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

Re: ASP:Net Core 2 Error creating DB2Connection

Post by Shalex » Mon 25 Mar 2019 13:51

dotConnect for DB2 doesn't include .NET Standard (.NET Core) assemblies.

The tutorial is for the projects with Target framework=.NET Framework 4.6.1 or later.

Post Reply