1

I currently have the problem, that a legacy-software is running fine on my local machine, but when I deploy a new version, the application crashes for the customer.

The application uses devart to connect to the used oracle-database. I have replaced the referenced devart dlls with their NuGet versions and locally, everything works just fine. When I copy the compiled files from my local pc and try to execute them on a customer-machine, I get the following error:

System.TypeLoadException: Method "InternalClone" in type "Devart.Common.Entity.fa" from assembly "Devart.Data.Oracle.Entity.EF6, Version=9.4.348.0, Culture=neutral, PublicKeyToken=09af7300eec23701" does not have an implementation.

I tried other versions of the devart nugets without success. The currently installed versions are the same as they where with the last version of the application, which runs just fine for our customers.

Any help would be very much appreciated, because I have been trying to solve this issue for two days now.

EDIT: I am using the .net framework 4.6 and entity framework 6, not .net core or .net standard

mamen
  • 1,202
  • 6
  • 26
  • This message is often about some setup/deployment inconsistency. Some component (.dll) references another component, but they were built at different times and one is more recent (has more methods/properties for example) and expects more things from the other. – Simon Mourier Jul 02 '21 at 14:41
  • @SimonMourier Do you know, how I could find out, which components reference which version of the assembly that is throwing the exception? – mamen Jul 03 '21 at 08:12
  • 1
    You can check all assemblies in the process (for example with a tool such as Process Explorer from sysinternals) what versions they are, see if anything looks inconsistent. You can also use ProcMon from sysinternals too and monitor file accesses (you can filter on your process name) – Simon Mourier Jul 03 '21 at 08:19
  • https://forums.devart.com/viewtopic.php?t=36413 – Hans Passant Jul 03 '21 at 12:46

1 Answers1

-1

If the Target framework property of your project is set to .NET Framework, you should use the Devart.* assemblies shipped with the provider installation:

  • "C:\Program Files (x86)\Devart\dotConnect\Oracle\Devart.Data.dll"
  • "C:\Program Files (x86)\Devart\dotConnect\Oracle\Devart.Data.Oracle.dll"
  • "C:\Program Files (x86)\Devart\dotConnect\Oracle\Entity\EF6\Devart.Data.Oracle.Entity.EF6.dll"

The package https://www.nuget.org/packages/devart.data.oracle.ef6 contains the assemblies compiled for .NET Standard 2.1.

Devart
  • 119,203
  • 23
  • 166
  • 186
  • I did use the local assemblies you mentioned, still no success. As soon as the application is started on any other machine, I get the exception. – mamen Jul 04 '21 at 16:16
  • 1
    Also, I want to deploy the application through our CI/CD pipeline. That's why I can't use my local DLLs and need to use nuget-packages instead. – mamen Jul 05 '21 at 06:45
  • If the provider is installed on your local computer, runtime loads Devart.* .NET Framework assemblies from GAC even if you referenced assemblies from another location. You can check this in the debug mode via Debug > Windows > Modules. Deploy your application on a brand-new virtual machine with provider assemblies from the installation folder to make sure it works this way. – Devart Jul 09 '21 at 10:18