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
I suggest to use this code (based on the answer of Jupaol):
[ClassInitialize] public static void SetUp(TestContext context) { AppDomain.CurrentDomain.SetData( "DataDirectory", context.TestDeploymentDir); }
Usually this will create your database inside TestResults\\Out\ folder of your solution.
TestResults\\Out\