Page 1 of 1

ASP:Net Core 2 Error creating DB2Connection

Posted: Wed 22 Aug 2018 08:54
by peterlapalus
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.

Re: ASP:Net Core 2 Error creating DB2Connection

Posted: Thu 23 Aug 2018 10:28
by Shalex
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/

Re: ASP:Net Core 2 Error creating DB2Connection

Posted: Wed 10 Oct 2018 10:14
by likemike91
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?

Re: ASP:Net Core 2 Error creating DB2Connection

Posted: Wed 10 Oct 2018 10:44
by likemike91
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.

Re: ASP:Net Core 2 Error creating DB2Connection

Posted: Fri 22 Mar 2019 13:04
by jwp
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

Re: ASP:Net Core 2 Error creating DB2Connection

Posted: Mon 25 Mar 2019 13:51
by Shalex
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.