3

Anyone who successfully used Entity Framework Power Tools Beta 2 to pre generate views with EF Code First?

I am getting "Sequence contains no matching element" error.

My setup is like this:

  • VS 2010 Ultimate
  • EF 4.2
  • MVC 3 (razor)
  • SQL Express 2008
Judo
  • 5,167
  • 3
  • 24
  • 34
rino.batin
  • 419
  • 3
  • 16
  • Have you tried using EF 4.3.1 instead of EF 4.2? – Arthur Vickers Apr 22 '12 at 16:24
  • I will try that but as per the description of the tool it should support 4.2 or later. – rino.batin Apr 23 '12 at 05:03
  • Someone on the blog post announcing beta 2 suggested that this error could be caused by having the project containing the derived DbContext class in a solution item folder. However, on my side, I'm still getting the same message as you after moving the project out of the solution item. Maybe you can try if that's your case and see if it helps. – sowee15 Apr 24 '12 at 17:33
  • Still having the same issue. VS2010 Pro. tried EF 4.2, 4.3.0, 4.3.1, 5.0 rc. Any other ideas? – Kevin McKinley Jul 11 '12 at 21:49

3 Answers3

1

I had the same issue and resolved it.

Make sure the MVC Web project is set as the start up project.

Quinntyne
  • 47
  • 1
  • 10
0

I simply uninstalled and re-installed EF 4.2.0.0 using Package Manager. The custom DbContext file is still inside a solution folder. Generating the view should display a message at the lower left of VS window -- "Finished EDM view pre-compilation for: <yourDbContext>! See file: <yourDbContext>.Views.cs"

rino.batin
  • 419
  • 3
  • 16
0

I had the same issue (with Beta 3 - and .NET 4/2010/EF5 etc.) - the solution was relatively simple.
I just moved out the project from the 'solution directory' into the root of the solution.

See this other post of mine for more details on how to use 'generated views'.

Mapping View to Entity using EF 5 Code First

why when i want use EF Power tools for view my model i get error?

Community
  • 1
  • 1
NSGaga-mostly-inactive
  • 14,052
  • 3
  • 41
  • 51