4

I'm trying to use LINQPad 4 (the latest beta) with Entity Framework POCO classes. I take the normal path of creating a new connection and then selecting "Entity Framework DbContext POCO(4.1) and then selecting my he assembly holding my classes. When I do so I get the following message

"Could not load file or assembly EntityFramework. Version=4.1.O.O, Culture= neutral, PublicKeyToken=b77a5c561934e089 or one of its dependencies.

The system cannot find the file specified."

I'm able to load the assembly from my application just fine. What gives? It seems a bit different from the previous problem like this reported in the CTP.

Sorax
  • 2,205
  • 13
  • 14
GlennSills
  • 3,977
  • 26
  • 28

1 Answers1

7

I had the same problem today, this is how I solved it:

Apparently the LINQPad 4.36.3 requires in some way Entity Framework 4.2 :/
It was released last week: ADO.NET blog

What I did is:

  1. Installed EF4.2 via NuGet
  2. Rebuilt the project
  3. Copied all my project .dll files to LINQPad folder (including the 4.2 EF.dll)
  4. I read here that I need to add something to the LINQPad.exe.config file but it was already there..
    [At this point I tried removing that assembly redirect and ran it against my 4.1 dll, did not work, was still looking for 4.2]
  5. Closed VS and uninstalled EF4.1

Thats it, after that both my project is now running on 4.2 and LINQPad works as well.

Jonathan Levison
  • 2,617
  • 1
  • 18
  • 22
  • Thanks! I updated LINQPad and EF on Friday afternoon and was fairly bummed to see my POCO connections stop working. `Test` would return `Successful` in the connection's properties menu. And then it would bomb on the editor with the same error as above. Copying `EntityFramework.dll` locally to `LINQPad`'s directory seems to have fixed it. – Sorax Nov 07 '11 at 14:38