Page 1 of 1

Devart.Data.Sugar.Entity.EFCore Scaffold-DbContext Error

Posted: Fri 31 Jan 2020 08:20
by oni
Hi, when i Scaffold-DbContext i get Errors like
Could not load file or assembly 'System.Diagnostics.PerformanceCounter
System.MissingMethodException : Method not found: 'System.AppDomainSetup
I have used the tutorial for DB2 https://www.devart.com/dotconnect/db2/d ... First.html.

Infos:
  • .NET Core 2.2
  • NPM Microsoft.EntityFrameworkCore.Tools installed
  • Reference: Devart.Data
  • Reference: Devart.Data.SqlShim
  • Reference: Devart.Data.Sugar
  • Reference: Devart.Data.Sugar.Entity.EFCore
I also have seen the Answer for Oracle to install from NuGet, but there is no NuGet for SugarCrm.
viewtopic.php?t=36461

Is there a tutorial for SugarCrm and .NET Core Scaffold-DbContext ?

Re: Devart.Data.Sugar.Entity.EFCore Scaffold-DbContext Error

Posted: Fri 31 Jan 2020 11:12
by oni
Update:
I changed the Project Framework from .NET Core 2.2 to .NET Framework 4.8.

Now there is an error "Devart.Data.Sugar.SugarException (0x80004005) SMTP-Server not configured".

Must SugarCrm be configured for SMTP that the connector can connect?
With RestSharp there is no problem to get the MetaData from SugarCrm.

Re: Devart.Data.Sugar.Entity.EFCore Scaffold-DbContext Error

Posted: Mon 03 Feb 2020 16:32
by Shalex
Could not load file or assembly 'System.Diagnostics.PerformanceCounter
1. dotConnect for SugarCRM doesn't include .NET Standard (.NET Core) assemblies. There is no 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:
* 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/

With dotConnect for SugarCRM, you can work with EF Core in the .NET Framework projects only.
Devart.Data.Sugar.SugarException (0x80004005) SMTP-Server not configured.
2. This is internal error of SugarCRM. Refer to:
* https://support.sugarcrm.com/Knowledge_ ... ith_Sugar/
* https://support.sugarcrm.com/Knowledge_ ... gar_Cloud/
Specify:
a) the line of code that throws this error
b) the full stack trace of the exception
c) if the code fails on executing SQL-92 statement, tell us the name of the SugarCRM object used in your SQL

Re: Devart.Data.Sugar.Entity.EFCore Scaffold-DbContext Error

Posted: Tue 04 Feb 2020 07:15
by oni
Ok, after i have configured the SMTP in SugarCrm the error disappeared.
Thanks!!!
Also with an .NET Framework 4.8 project i could now use scaffold-dbcontext.

Then i changed the project back to .NET Core 2.2 and all compiles fine.
Now i have to use this project library in an .NET Core 2.2 Web-API.
Is this not possible?
I don't understand the answer
With dotConnect for SugarCRM, you can work with EF Core in the .NET Framework projects only.
How do i have to use a lisence file in this scenario?

Re: Devart.Data.Sugar.Entity.EFCore Scaffold-DbContext Error

Posted: Tue 04 Feb 2020 19:45
by Shalex
oni wrote: Tue 04 Feb 2020 07:15Also with an .NET Framework 4.8 project i could now use scaffold-dbcontext.

Then i changed the project back to .NET Core 2.2 and all compiles fine.
We guarantee the compatibility of the dotConnect for SugarCRM assemblies with .NET Framework projects only.