I am using LocalDb and I just want to delete my database.
I was under the impression that due to the way that LocalDb works I would just be able to access the *.mdf and *.ldf files that the local DB instance has created in my App_Data folder (I am using MVC5 by the way).
And that next time I start the application and use it they would just create new files and I would have a new database. But when I delete the files I get the following message...
Cannot attach the file 'c:\users\exitos\documents\visual studio 2013\Projects\xxxxxxxxxxxxxxxxxxxxxx\xxxxxxxxxxxxxxxxxxxxxx\App_Data\aspnet-xxxxxxxxxxxxxxxxxxxxxx-20140118101721.mdf' as database 'aspnet-xxxxxxxxxxxxxxxxxxxxxx-20140118101721'.
Why? I did a reset to my initial commit using GIT to make sure the entire solution folder was 'box fresh' and I still get the problem. I even stopped the Sql Server Express from running and killed all Sql processes and still the same problem.
Is the .ldf and .mdf file written to the registry or something?
I changed the name of the file in the .config and it worked but I don't want to have to keep doing that. I just want to tear down my database by physically deleting it...
