I have Visual Studio 2008 and ASP.NET MVC2 project. To App_data folder I added ContactManager.mdf file (Add existing item). Now I try this file to add tables to this database. But when I double-click this file it open like txt file: cŔ>xň›G0- ... And it should open in editor which looks like Management Studio when I can create tables in Visual Studio without open MS SQL Management Studio. I thik that I must install any application but I don't know which. I have full version Visual Studio 2008.
When I get right-click on App_data then Add new item and select SQL Server database and click Add messagebox with error: Object reference not set to an instance of an object is showed.
Mdf file is not readable as is. You have to "mount" the MDF file in a running instance of Sql Server, either under sql service, or user instance (easiest in VS).
After that, you can open the DB using the connection manager window of VS. VS will automatically find the db in the app_data folder and provide a ready to use connection to it.