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.