Last post Sep 21, 2013 12:06 AM by cnranasinghe
Sep 17, 2013 10:01 AM|rpfinnimore|LINK
Moved some VS 2010 over to VS 2012 running on a Window7 pc. When I go to open one of the solutions in VS 2012 I get a message to the effect that the project "requires SQL Server Express which is not installed on this computer. The recomended database engine
for visual studio 2012 is SQL Server LocalDB Express. To upgrade the project database SQL Server LocalDB Express double click the database file and follow the instructions..." . My question is what database file should I double click? I look through my
project and don't see any SQL Server database files.
Could someone kindly show me what I should be doing to upgrade to SQL Server LocalDB Express? If I'm missing something obvious please excuse I'm a bit of a newbie to VS. Thanks much in advance for any help, Roscoe
Sep 17, 2013 10:04 AM|MetalAsp.Net|LINK
Are you using ANY database at all in your project?
Sep 17, 2013 10:41 AM|oned_gk|LINK
Sep 17, 2013 10:51 AM|rpfinnimore|LINK
Hi MetalAsp.net thanks for the quick reply. Yes on reviewing the web.config I am using an ms sql db for securing the site. The connection string in web.config is defined as...
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
when I comment out this line in web.config and save/exit and then start up VS2012 and go into the solution the message is not presented. What should I change the connection string to so that it works with VS 2012?
Thanks much, Roscoe
Sep 17, 2013 10:56 AM|rpfinnimore|LINK
Thanks oned_gk for the quick reply...think it has to do with the connection string used to secure the site.
Sep 17, 2013 11:03 AM|MetalAsp.Net|LINK
See if this page helps:
Sep 18, 2013 10:35 AM|Starain chen - MSFT|LINK
Thanks for your post!
I think, you can modify connectionString as this:
<add name="ApplicationServices" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnetdb.mdf;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
You also should attach that database file to your (LocalDb)\v11.0 database, for more information, please refer to http://technet.microsoft.com/en-us/library/ms179877.aspx
EXEC sp_attach_db @dbname = N'AdventureWorks2012',
N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Data\AdventureWorks2012_Data.mdf',
N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Data\AdventureWorks2012_log.ldf';
On the other hand, I suggest that you can installed the SQL Express if you want to deploy this project into the local IIS.
Sep 21, 2013 12:06 AM|cnranasinghe|LINK
Did you uninstall SQL express? if not, repaire SQL Express and VS 2012. Problem seems to be that VS2012 can not communicate with SQL express.