Page 1 of 1

GAC policies for EF6 assemblies

Posted: Tue 28 Jul 2015 11:16
by mko
Hi,

we have a problem with deployed ASP.NET applications when a new version of Devart dotConnect is installed on the machine. We are using EF6.

Here is our configuration:

Code: Select all

<system.data>
  <DbProviderFactories>
    <clear />
      <add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql" description="Devart dotConnect for PostgreSQL" type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.3.191.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </DbProviderFactories>
</system.data>
<entityFramework>
  <providers>
    <provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity, Version=7.3.191.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </providers>
</entityFramework>
After installing version 7.3.422 we get the following exception:

Code: Select all

System.InvalidOperationException: The 'Instance' member of the Entity Framework provider type 'Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity, Version=7.3.422.0, Culture=neutral, PublicKeyToken=09af7300eec23701' did not return an object that inherits from 'System.Data.Entity.Core.Common.DbProviderServices'. Entity Framework providers must inherit from this class and the 'Instance' member must return the singleton instance of the provider. This may be because the provider does not support Entity Framework 6 or later; see http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
So when requesting version 7.3.191.6 it actually tries to use 7.4.422.0.
This leads me to believe that the policies might be wrong for the EF6 assemblies (*.*.*.6) or that there is no policy to say: Use version 7.3.422.6 when requesting version 7.3.191.6.

Can you please check your policies? Or is there a different problem?
Thank you very much in advance!

Re: GAC policies for EF6 assemblies

Posted: Wed 29 Jul 2015 14:35
by Shalex
mko wrote:So when requesting version 7.3.191.6 it actually tries to use 7.4.422.0.
This is a known issue. Please update the provider versions in your *.config when upgrading the Devart.* assemblies. Please note that the revision number of provider in the entityFramework section is *.6 (7.4.422.6) but it should be *.0 (7.4.422.0) in DbProviderFactories.
mko wrote:Can you please check your policies? Or is there a different problem?
We are considering the possibility of renaming Devart Entity Framework assemblies to include EF version in the name. This will allow to employ correctly policy.*.Devart.* files in the scenario you have described.

Re: GAC policies for EF6 assemblies

Posted: Thu 10 Dec 2015 10:42
by mko
Any progress on this issue? Thanks!

Re: GAC policies for EF6 assemblies

Posted: Fri 11 Dec 2015 10:27
by MariiaI
The possibility of renaming Devart Entity Framework assemblies to include EF version in the name will be considered in details when EF7 support will be ready for release (it is planned in several months).
We will definitely inform you about the results as soon as any are available.

Re: GAC policies for EF6 assemblies

Posted: Tue 26 Apr 2016 14:54
by Shalex
Entity Framework-related assemblies are renamed for all the providers that support Entity Framework. Previously each of the providers contained several assemblies with the same name - Devart.Data.PostgreSql.Entity.dll for different Entity Framework versions, which had different revision number. This could cause confusions, so now assemblies for different versions of Entity Framework have different names: http://forums.devart.com/viewtopic.php?f=3&t=33573.

Re: GAC policies for EF6 assemblies

Posted: Thu 28 Apr 2016 05:17
by mko
Shalex wrote:Entity Framework-related assemblies are renamed for all the providers that support Entity Framework. Previously each of the providers contained several assemblies with the same name - Devart.Data.PostgreSql.Entity.dll for different Entity Framework versions, which had different revision number. This could cause confusions, so now assemblies for different versions of Entity Framework have different names: http://forums.devart.com/viewtopic.php?f=3&t=33573.
Thank you for the information!