none
Entity Framework Migration from 3.5 to 4.5.1 RRS feed

  • Question

  • I have updated .Net framework of a WPF complex application from 3.5 to 4.5.1. I have changed Target Framework for all projects as 4.5.1.

    After changing .net framework I am getting below error.

    Inner Exception :

    An unhandled exception of type 'System.Data.EntityCommandCompilationException' occurred in System.Data.Entity.dll

    Inner Exception message : -"The mapping and metadata information for EntityContainer 'ApplicationNameDataContext' no longer matches the information used to create the pre- generated views."


    Stack Trace :


       at System.Data.Mapping.StorageMappingItemCollection.ViewDictionary.SerializedAddGeneratedViewsInEntityViewContainer(MetadataWorkspace workspace, EntityViewContainer entityViewContainer, Dictionary`2 extentMappingViews)
       at System.Data.Mapping.StorageMappingItemCollection.ViewDictionary.SerializedCollectViewsFromObjectCollection(MetadataWorkspace workspace, Dictionary`2 extentMappingViews)
       at System.Data.Mapping.StorageMappingItemCollection.ViewDictionary.SerializedGetGeneratedViews(EntityContainer container)
       at System.Data.Common.Utils.Memoizer`2.Result.GetValue()
       at System.Data.Common.Utils.Memoizer`2.Evaluate(TArg arg)
       at System.Data.Mapping.StorageMappingItemCollection.ViewDictionary.GetGeneratedView(EntitySetBase extent, MetadataWorkspace workspace, StorageMappingItemCollection storageMappingItemCollection)
       at System.Data.Query.PlanCompiler.PreProcessor.ExpandView(Node node, ScanTableOp scanTableOp, IsOfOp& typeFilter)
       at System.Data.Query.PlanCompiler.PreProcessor.ProcessScanTable(Node scanTableNode, ScanTableOp scanTableOp, IsOfOp& typeFilter)
       at System.Data.Query.PlanCompiler.PreProcessor.Visit(ScanTableOp op, Node n)
       at System.Data.Query.PlanCompiler.SubqueryTrackingVisitor.VisitChildren(Node n)
       at System.Data.Query.PlanCompiler.SubqueryTrackingVisitor.VisitRelOpDefault(RelOp op, Node n)
       at System.Data.Query.PlanCompiler.SubqueryTrackingVisitor.VisitChildren(Node n)
       at System.Data.Query.PlanCompiler.SubqueryTrackingVisitor.VisitRelOpDefault(RelOp op, Node n)
       at System.Data.Query.PlanCompiler.PreProcessor.Visit(ProjectOp op, Node n)
       at System.Data.Query.PlanCompiler.SubqueryTrackingVisitor.VisitChildren(Node n)
       at System.Data.Query.InternalTrees.BasicOpVisitorOfNode.VisitDefault(Node n)
       at System.Data.Query.InternalTrees.BasicOpVisitorOfNode.VisitPhysicalOpDefault(PhysicalOp op, Node n)
       at System.Data.Query.PlanCompiler.PreProcessor.Process(Dictionary`2& tvfResultKeys)
       at System.Data.Query.PlanCompiler.PreProcessor.Process(PlanCompiler planCompilerState, StructuredTypeInfo& typeInfo, Dictionary`2& tvfResultKeys)
       at System.Data.Query.PlanCompiler.PlanCompiler.Compile(List`1& providerCommands, ColumnMap& resultColumnMap, Int32& columnCount, Set`1& entitySets)
       at System.Data.EntityClient.EntityCommandDefinition..ctor(DbProviderFactory storeProviderFactory, DbCommandTree commandTree)


    Any thoughts why this is happening?

    Application is running fine with VS2010 and .Net framework 3.5. Project have 4.0.0.0 version of System.Data.Entity Dll.

    Monday, August 31, 2015 7:54 AM

Answers

  • Please refer to link

    http://stackoverflow.com/questions/32253838/entity-framework-exception-after-migrating-wpf-application-to-net-framework-4-5

    Tuesday, September 1, 2015 11:13 AM

All replies