1

I'm trying to generate entity model from my Postgresql database. Under .net 3.5 and vs2008 it worked fine. Unfortunately under vs10 it doesn't. I get an error:

"The file references an XML namespace that is inconsistend with the target framework of the project."

I assume it's because EF4 is using EDMX v2 not v1, but I cannot change it using RetrofitModel parameter of EdmGen2 (there is similar parameter in available under ModelGen but not RetrofitModel). I've tried to change the version and references manually in xml and was able to display edmx file in designer - it was empty though.

Question

How to generate EF4 design files for VS10 from Postgresql database?

kyrisu
  • 4,541
  • 10
  • 43
  • 66
  • The problem was that I was using /RetrofitModel - here updating references should work (my db had an error which prevented me from noticing it). To generate EDMX V2 /ModelGen works just fine (doesn't detect dependencies but in my case it's even better). – kyrisu Apr 29 '10 at 21:53
  • So, when you use `/ModelGen`, does it generate the edmx file as well? – Willem Aug 23 '12 at 07:07
  • If you will post this as an answer, I will upvote it. That will help close this out as well. – Chris Travers Mar 14 '13 at 08:51

1 Answers1

0

Just to close this question:

The problem was that I was using /RetrofitModel - here updating references should work (my db had an error which prevented me from noticing it). To generate EDMX V2 /ModelGen works just fine (doesn't detect dependencies but in my case it's even better).

kyrisu
  • 4,541
  • 10
  • 43
  • 66