Entity Framework update-database "Could not load file or assembly or one of its dependencies. The system cannot find the file specified."


Entity Framework update-database "Could not load file or assembly or one of its dependencies. The system cannot find the file specified."

Jul, 11, 2012

I spun wheel for a while on this one. Every time I ran the update-database or add-migration command I was getting "Could not load file or assembly 'MyProject.Name' or one of its dependencies. The system cannot find the file specified."

First I found this blog post which gave a few hints, but none of these were my problems. http://www.reddybrek.com/post/How-to-avoid-the-entity-framework-migrations-error-Could-not-load-file-or-assembly-or-one-of-its-dependencies.aspx.

My issue ended up being the wrong project was selected as the StartUp project. I had just forked a repo and hadn't even try to run it yet, so a random class library was selected as the StartUp Project. I switched it to the web project and it worked fine after that.


Tags: Entity Framework, Migrations

Contact

Recent Posts

Entity Framework update-database "Could not load file or assembly or one of its dependencies. The system cannot find the file specified."

I spun wheel for a while on this one. Every time I ran the update-database or add-migration command I was getting "Could not load file or assembly 'MyProject.Name' or one of its dependencies. The... Read More

You get nahzing, Lebowski!

Windows 8 CP to Windows 8 RP doesn't give you many choices on what I get to keep when I upgrade. Guess I won't be needing that "Help me decide" link.... Read More

 
@nickspiers