How does Devart determine what EF DLL to use?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
johnselkirk
Posts: 10
Joined: Thu 07 Oct 2010 00:03
Location: US

How does Devart determine what EF DLL to use?

Post by johnselkirk » Sun 25 Mar 2018 15:28

Hi,

I am having an issue after upgrading from 8.5 to 9.5 of dotConnect. Between those releases Devart renamed the EF DLLs to have the EF version encoded in the filename (a good move!).

The issue I am having is that after the upgrade, and without changing anything in the consuming project, I am getting an error like this:

Code: Select all

System.Data.MetadataException: Schema specified is not valid. Errors: 
Model.Oracle.ssdl(2,166) : error 0004: Could not load file or assembly 'Devart.Data.Oracle.Entity.EF5, Version=9.5.454.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The system cannot find the file specified.
   at System.Data.Metadata.Edm.StoreItemCollection.Loader.ThrowOnNonWarningErrors()
   at System.Data.Metadata.Edm.StoreItemCollection.Loader.LoadItems(IEnumerable`1 xmlReaders, IEnumerable`1 sourceFilePaths)
   at System.Data.Metadata.Edm.StoreItemCollection.Init(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths, Boolean throwOnError, DbProviderManifest& providerManifest, DbProviderFactory& providerFactory, String& providerManifestToken, Memoizer`2& cachedCTypeFunction)
   at System.Data.Metadata.Edm.StoreItemCollection..ctor(IEnumerable`1 xmlReaders, IEnumerable`1 filePaths)
   at System.Data.Metadata.Edm.MetadataCache.StoreMetadataEntry.LoadStoreCollection(EdmItemCollection edmItemCollection, MetadataArtifactLoader loader)
   at System.Data.Metadata.Edm.MetadataCache.LoadItemCollection[T](IItemCollectionLoader`1 itemCollectionLoader, T entry)
   at System.Data.Metadata.Edm.MetadataCache.GetOrCreateStoreAndMappingItemCollections(String cacheKey, MetadataArtifactLoader loader, EdmItemCollection edmItemCollection, Object& entryToken)
   at System.Data.EntityClient.EntityConnection.LoadStoreItemCollections(MetadataWorkspace workspace, DbConnection storeConnection, DbProviderFactory factory, DbConnectionOptions connectionOptions, EdmItemCollection edmItemCollection, MetadataArtifactLoader artifactLoader)
   at System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections)
   at System.Data.EntityClient..InitializeMetadata(DbConnection newConnection, DbConnection originalConnection, Boolean closeOriginalConnectionOnFailure)
   at System.Data.EntityClient.EntityConnection.Open()
   at System.Data.Objects.ObjectContext.EnsureConnection()
   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
This is a EF1 project (needs to be .NET 3.5) and the Devart.Data.Oracle.Entity.EF1 DLL is alongside the application (in addition to Devart.Data.dll and Devart.Data.Oracle.dll).

What in the project does Devart.Data.Oracle.OracleProviderFactory use to determine that it needs to load EF5 rather than EF1?

It's crunch time on a delivery (and we need a fix from this release) so any tips would be appreciated!

John.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: How does Devart determine what EF DLL to use?

Post by Shalex » Tue 27 Mar 2018 20:07

1. Please open your project in Visual Studio, navigate to Solution Explorer and make sure that your project references Devart.Data.Oracle.Entity.EF1.dll in the References node. Rebuild the project.

2. Run your project in the debug mode, set a breakpoint, navigate to the Debug > Windows > Modules menu and specify the Path and Version values of Devart.* and EF assemblies loaded in the process of your application.

Post Reply