I'm using VS2012 and I've done something to break my EntityFramework configuration. The setup and EDMX were working correctly for some time using EF5.
Later I upgraded to EF6 and at that point was forced to make a handful of manual namespace changes to generated code each time I updated the model. But it still worked.
Now I am attempting to eliminate the problem which requires me to change the namespaces each time, but I've broken something.
Currently I cannot generate a DB first EDMX model at all. When I attempt this the wizard proceeds through the steps and then throws an error -- first a dialog about a null reference and then in the VS output:
Unable to generate the model because of 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'.
at Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.DbDatabaseMappingBuilder.Build(SimpleMappingContext mappingContext)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.GenerateModel(List`1 errors)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModels(String storeModelNamespace, ModelBuilderSettings settings, List`1 errors)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModel(ModelBuilderSettings settings, ModelBuilderEngineHostContext hostContext)'.
I have removed EF and reinstalled EF6 with NUGET. I have also tried this in a newly created project with the same result.
Google searches have not been fruitful. Any ideas?
Currently installed version of EF is 6.1.0