0

I'm exploring Entity Framework and I'm having some trouble when I try to generate a model using the EF 6 EntityObject Generator template. Once the template completes its operation I get a bunch of errors in the error list. Here are four of the errors:

The name 'TemplateMetadata' does not exist in the current context 'System.Data.Metadata.Edm.EnumType' is inaccessible due to its protection level 'System.Data.Metadata.Edm.EnumType' does not contain a definition for 'UnderlyingType' and no extension method 'UnderlyingType' accepting a first argument of type 'System.Data.Metadata.Edm.EnumType' could be found (are you missing a using directive or an assembly reference?) 'Microsoft.VisualStudio.TextTemplating32E3A8132CB3A5BCD6B75A5C1B94668D.GeneratedTextTransformation.MetadataConstants' does not contain a definition for 'TT_TEMPLATE_VERSION'

According to this SO post EF 6 will work with .NET 4, but according to this CodePlex post, EF 6 doesn't support .NET 4 so as a complete beginner to EF, I'm a bit confused.

If I cannot use EF 6, how can I safely downgrade my project to EF 5?

halfer
  • 19,824
  • 17
  • 99
  • 186
mack
  • 2,715
  • 8
  • 40
  • 68
  • To downgrade to EF 5 I followed [this SO post](http://stackoverflow.com/questions/20282678/how-to-downgrade-entity-framework-from-6-to-5) – mack Oct 03 '14 at 15:32
  • 1
    Why do you use the EntityObject template instead of the DbContext one that is the default and built-in VS2013? (also why aren't you using .NET Framework 4.5?) – Pawel Oct 03 '14 at 16:24
  • So right now you are running .NET 4.0, EF 5.0 in VS2010? Once you downgraded, did you have the same issue? – Termato Oct 03 '14 at 16:59
  • 1
    @Termato, yes, I'm using .net 4 EF 5 and VS2010, once I downgraded to EF 5 I didn't get any error messages and it seemed to work fine. – mack Oct 03 '14 at 18:04
  • You should answer your own question :) and then mark it as answered. – Termato Oct 03 '14 at 18:29

0 Answers0