Search code examples
asp.net-mvcasp.net-mvc-3visual-studio-2010visual-web-developer-2010

Could not load file or assembly 'EntityFramework (1)'


Error is as follows:
C:\Users\[username]\Google Drive\VS2010\Projects\[project name]\[project name]\Views\Show\EditOrder.cshtml: ASP.NET runtime error: Could not load file or assembly 'EntityFramework (1)' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

Hey all,
Got a strange problem here. seemingly randomly my project completely borked itself. A little bit of background: It's a ASP.Net MVC3 (.Net Framework 4) project that I mostly authored in Visual Web Developer 2010 Express. I say mostly because you'll note in the verbose error above I've stored it on my Google Drive. I'm syncing this project back and forth to my new development laptop, with an install of Visual Studio 2010 Professional. This probably isn't a great idea, but I wanted a simple method of working on it here on my desktop (at the office), at home (on my dev laptop), and on the road (again, dev laptop.)

Any ideas on what might have happened, and how I can fix this?

Bit more of background, now that I'm remembering this ... I had issues publishing it to our local IIS 6 server. I realized I had to add the _bin_deployableAssemblies to the package for it to work. At some point, I had deleted them from the project and re-added them. It was probably around that time, or at least within a few hours, that this issue started happening.

I can has halp?


Solution

  • Bloody strange ..

    Looking in my /[Project Name]/bin folder I found 4 strange files:

    EntityFramework (1).dll
    EntityFramework (1).xml
    [Project Name] (1).dll
    [Project Name] (1).pdb
    

    In any case, after deleting them guys and doing a Rebuild, all is well!

    (Anyone have any ideas as to how or why this happened? Might be a Google Drive issue, now that I'm thinking about it ...