We have a Visual Studio 2012 ASP.NET MVC project using Entity Framework 5.
There are some unit tests that depend on a database. Setting up the app.config file in the
Keep in mind that for a test project:
AttachDBFilename=|DataDirectory|
means it will look in your output /bin/debug folder for a unit test as opposed to the App_Data folder in your web/production/whatever app.
You need to do two things 1. Move the database file OUT OF your App_Data folder to your root of your test app. 2. Highlight your database so you get your properties window in Visual Studio. Set the build action to "Content" so it will get copied to your output folder when you run the project.
Voila.