GAC policies for EF6 assemblies

GAC policies for EF6 assemblies

Postby mko » Tue 28 Jul 2015 11:16

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!
mko
 
Posts: 6
Joined: Tue 28 Jul 2015 09:37

Re: GAC policies for EF6 assemblies

Postby Shalex » Wed 29 Jul 2015 14:35

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.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Re: GAC policies for EF6 assemblies

Postby mko » Thu 10 Dec 2015 10:42

Any progress on this issue? Thanks!
mko
 
Posts: 6
Joined: Tue 28 Jul 2015 09:37

Re: GAC policies for EF6 assemblies

Postby MariiaI » Fri 11 Dec 2015 10:27

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.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: GAC policies for EF6 assemblies

Postby Shalex » Tue 26 Apr 2016 14:54

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.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Re: GAC policies for EF6 assemblies

Postby mko » Thu 28 Apr 2016 05:17

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!
mko
 
Posts: 6
Joined: Tue 28 Jul 2015 09:37


Return to dotConnect for PostgreSQL