Bug 10296 - Entity Framework: Could not load type 'System.Data.Entity.Core.Common.CommandTrees.DbInExpression'
Summary: Entity Framework: Could not load type 'System.Data.Entity.Core.Common.Command...
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2013-02-14 07:46 UTC by Oleg
Modified: 2013-02-15 06:16 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample MonoDevelop project to reproduce error (4.68 MB, application/octet-stream)
2013-02-14 07:46 UTC, Oleg
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Oleg 2013-02-14 07:46:05 UTC
Created attachment 3375 [details]
Sample MonoDevelop project to reproduce error

Please, take a look at discussion at
http://mono.1490590.n4.nabble.com/Entity-Framework-new-issues-tp4658551.html

Application with Entity Framework with model first and metadata in files, not embedded resources fails with error "Could not load type"

Note: you may need to update database connection string in App.config with your credentials
Note: sample project includes trial license for database provider that expires within 6 days, it could be required to regenerate license after this time following instructions at vendor site if there will be no free provider with EF6 support at that time
Note: sample project includes System.Xml.dll and EntityFramework.dll with patches made after Mono 3.0.3, do not delete them if you test with Mono 3.0.3 or earlier

Full exception:

System.Data.Entity.Core.EntityCommandCompilationException: An error occurred while preparing the command definition. See the inner exception for details. ---> System.Exception: Could not load type 'System.Data.Entity.Core.Common.CommandTrees.DbInExpression' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
  at System.Data.Common.CommandTrees.b.a (System.Data.Entity.Core.Common.CommandTrees.DbQueryCommandTree A_0) [0x00000] in <filename unknown>:0
  at System.Data.Common.CommandTrees.b.a (System.Data.Entity.Core.Common.CommandTrees.DbCommandTree A_0) [0x00000] in <filename unknown>:0
  at System.Data.Common.CommandTrees.b.b (System.Data.Entity.Core.Common.CommandTrees.DbCommandTree A_0) [0x00000] in <filename unknown>:0
  at Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices.a (System.Data.Entity.Core.Common.CommandTrees.DbCommandTree A_0, Devart.Common.Entity.ce A_1) [0x00000] in <filename unknown>:0
  at Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices.CreateDbCommandDefinition (System.Data.Entity.Core.Common.DbProviderManifest providerManifest, System.Data.Entity.Core.Common.CommandTrees.DbCommandTree commandTree) [0x00000] in <filename unknown>:0
  at System.Data.Entity.Core.Common.DbProviderServices.CreateCommandDefinition (System.Data.Entity.Core.Common.CommandTrees.DbCommandTree commandTree) [0x00000] in <filename unknown>:0
  at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition..ctor (System.Data.Common.DbProviderFactory storeProviderFactory, System.Data.Entity.Core.Common.CommandTrees.DbCommandTree commandTree, System.Data.Entity.Core.Query.ResultAssembly.BridgeDataReaderFactory bridgeDataReaderFactory) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition..ctor (System.Data.Common.DbProviderFactory storeProviderFactory, System.Data.Entity.Core.Common.CommandTrees.DbCommandTree commandTree, System.Data.Entity.Core.Query.ResultAssembly.BridgeDataReaderFactory bridgeDataReaderFactory) [0x00000] in <filename unknown>:0
  at System.Data.Entity.Core.EntityClient.Internal.EntityProviderServices.CreateCommandDefinition (System.Data.Common.DbProviderFactory storeProviderFactory, System.Data.Entity.Core.Common.CommandTrees.DbCommandTree commandTree) [0x00000] in <filename unknown>:0
  at System.Data.Entity.Core.EntityClient.Internal.EntityProviderServices.CreateDbCommandDefinition (System.Data.Entity.Core.Common.DbProviderManifest providerManifest, System.Data.Entity.Core.Common.CommandTrees.DbCommandTree commandTree) [0x00000] in <filename unknown>:0
  at System.Data.Entity.Core.Common.DbProviderServices.CreateCommandDefinition (System.Data.Entity.Core.Common.CommandTrees.DbCommandTree commandTree) [0x00000] in <filename unknown>:0
  at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory.Prepare (System.Data.Entity.Core.Objects.ObjectContext context, System.Data.Entity.Core.Common.CommandTrees.DbQueryCommandTree tree, System.Type elementType, MergeOption mergeOption, System.Data.Entity.Core.Objects.Span span, IEnumerable`1 compiledQueryParameters, System.Data.Entity.Core.Common.Utils.AliasGenerator aliasGenerator) [0x00000] in <filename unknown>:0
Comment 1 Marek Safar 2013-02-14 08:00:15 UTC
Move version EF uses snapshot before this breaking change in EF was made and DbInExpression introduced.

Will try to update our EF version
Comment 2 Marek Safar 2013-02-15 06:16:51 UTC
Should be fixed in master