I installed a clean version of Windows 10 and Visual Studio 2015. I checked out my project from Visual Studio Team Services (was TFS Online) and built it. Ok! Then I went to run it and got this message when I hit a page that called the database.
I see the db was created by Entity Framework and my tables are there (when looking at SQL Server Object Explorer) in VS. But I'm a little confused as to why it's asking me to update the db, I haven't changed any thing since EF created it.
I then ran
update-database -verbose
in the console but I got this error message:
Cannot attach the file 'C:\TFS\YogaProject\YogaProject\App_Data\YogaProjectDatabase.mdf' as database 'YogaProjectDatabase'.
What else do I need to do here?
Here is my connection string
connectionString="Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\YogaProjectDatabase.mdf;Initial Catalog=YogaProjectDatabase;Integrated Security=True"