Entity Framework cannot generate DB EDMX

I uninstalled DevExpress CodeRush from Visual Studio 2013 and got a situation that I haven't been able to fix yet. VS crashed due to uninstalling CodeRush and I tried to reinstall VS 2013, but everything works, but the code that created the .EDMX

. I can load the table names in Update Model from Database, but after selecting the tables I want, this message appears:

Unable to generate model due to the following exception: 'System.TypeLoadException: Could not load type' System.Data.Entity.Core.Mapping.EntityContainerMapping 'from assembly' EntityFramework, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 ' ...
in Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.DbDatabaseMappingBuilder.Build (SimpleMappingContext mappingContext)
in Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.GenerateModel (list 1 Error) in Microsoft.Data.Entity. Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModel (ModelBuilderSettings settings, IVsUtils vsUtils, ModelBuilderEngineHostContext hostContext).1 errors)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModels(String storeModelNamespace, ModelBuilderSettings settings, List



I've tried all options EntityFramework cannot generate DB EDMX - null reference, cannot load type without success.

I uninstalled all VS 2013. Reinstalled and updated to VS 2013.4. Entity Framework 6.1.1 was installed with VS Update 4. The problem persists. I tried to install version 6.1.3 with no success. It was suggested to install 6.0.2, but I couldn't find one to download.

The model editor works, I can edit tables and create tables manually. What I cannot do is update the EDMX file from the database.

Where do I need to search to fix this problem? I am unable to update the structure of the database. How does the Entity Framework generator work? Do I need to change something in machine.conf

?

Any hint would be helpful.

Thanks, Marco Castro

+3


source to share


1 answer


The correct solution to this issue is indeed to install Entity Framework 6.0.2, which is located in the \ EFTools folder on the first version of Visual Studio 2013. Installing VS updates will install the broken version of EFTools.



0


source







All Articles