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
4
  • Have you tried using EF 4.3.1 instead of EF 4.2? Apr 22, 2012 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, 2012 at 5: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, 2012 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? Jul 11, 2012 at 21:49

3 Answers 3

1

I had the same issue and resolved it.

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

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"

1
  • I tried that but with EF 4.3.1.0 and I'm getting the same error. Its still beta after all!
    – sowee15
    May 17, 2012 at 15:48
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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.