Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, February 5, 2013 2:36 PM | 1 vote
After removing SQL Server Express (I wasn't using it) on my machine, I got the following error:
Microsoft Visual Studio
The Web project '{Project Name}' requires SQL Server Express, which is not installed on this computer. The recommended database engine for Visual Studio 2012 is SQL Server LocalDB Express.
To upgrade the project database to use SQL Server LocalDB Express, double-click the database file and follow the instructions. Note: After this upgrade, the project database can't be modified using earlier versions of Visual Studio.
To continue using SQL Server Express for this project, install it from the Microsoft Download Center.
The problem is that I can't find the database file referenced in the error message, so I can't follow the instructions as suggested.
I'd love to upgrade the project DB to use SQL Server LocalDB Express - just can't see how to do that with the instructions given.
"We're all in it together, kid." - Harry Tuttle, Heating Engineer
All replies (11)
Wednesday, February 6, 2013 9:34 AM
Hi Bleak,
I am moving your thread into the SQL Server Express Forum for dedicated support. Thanks for your understanding.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Wednesday, February 6, 2013 10:20 AM | 1 vote
Hi Bleak,
The primary method of installing LocalDB is by using the SqlLocalDB.msi program. LocalDB is an option when installing any SKU of SQL Server 2012 Express. Select LocalDB on the Feature Selection page during installation of SQL Server Express. There can be only one installation of the LocalDB binary files for each major SQL Server Database Engine version.
SQL Server 2012 Express LocalDB: http://msdn.microsoft.com/en-us/library/hh510202(v=SQL.110).aspx.
How to: Upgrade to LocalDB or Continue with SQL Server Express: http://msdn.microsoft.com/en-us/library/hh873188(v=vs.110).aspx.
If you have any feedback on our support, please click here.
Thanks.
Maggie Luo
TechNet Community Support
Wednesday, February 6, 2013 1:36 PM
Hi Bleak,
I am moving your thread into the SQL Server Express Forum for dedicated support. Thanks for your understanding.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
That doesn't make any sense because the only thing this has in common with SQL Server Express is that I uninstalled it.
Please move it back.
"We're all in it together, kid." - Harry Tuttle, Heating Engineer
Wednesday, February 6, 2013 1:41 PM
Hi Bleak,
How to: Upgrade to LocalDB or Continue with SQL Server Express: http://msdn.microsoft.com/en-us/library/hh873188(v=vs.110).aspx.
I began to follow the steps in the link provided.
I cannot follow this step:
Attach a database file: Path, where Path is the physical path of the primary .mdf file.
The reason is that, as I said in my initial post:
The problem is that I can't find the database file referenced in the error message, so I can't follow the instructions as suggested.
No .mdf file exists in my project.
"We're all in it together, kid." - Harry Tuttle, Heating Engineer
Thursday, February 7, 2013 3:14 AM
Hi Bleak,
Did you have any databases in your server? I think if you have a SQL Server database, there would be database file (.mdf) and log file (.ldf).
If you have any problem, please feel free to let us know.
Thanks.
Maggie Luo
TechNet Community Support
Thursday, February 7, 2013 7:21 AM
Hi Bleak,
I asked Luo to help us move this thread back to this forum, sorry for my misunderstanding for this issue.
The Web project '{Project Name}' requires SQL Server Express, which is not installed on this computer. The recommended database engine for Visual Studio 2012 is SQL Server LocalDB Express.
To upgrade the project database to use SQL Server LocalDB Express, double-click the database file and follow the instructions. Note: After this upgrade, the project database can't be modified using earlier versions of Visual Studio...
Based on the error message, certain project requires the builtin Sql Express, like Visual Studio LightSwitch projects. If possible our suggestion is that you had better not uninstall the SQL Express. You could get it back by repair VS.
If you insist removing SQL Express. I’m afraid you need a full version of SQL Server as replacement, and adjust database setting in the project.
If I misunderstood anything, please make free feel to let me know.
Sincerely,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Thursday, February 7, 2013 1:45 PM
Did you have any databases in your server? I think if you have a SQL Server database, there would be database file (.mdf) and log file (.ldf).
The only references to .mdf or .ldf in the project are the following line in the Web.config...
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
That .mdf file is not part of the solution though so the error message is confusing.
The application doesn't seem to use it - the only place "ApplicationServices" are referenced are in the Web.config file.
The same is true for "AspNetSqlMembershipProvider", "AspNetSqlProfileProvider", and "AspNetSqlRoleProvider" - in fact, the Web.config blocks for the latter three have been commented out.
"We're all in it together, kid." - Harry Tuttle, Heating Engineer
Friday, February 8, 2013 2:01 AM
Hi Bleak,
Glad to receive your reply.
I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Have a nice weekend,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Friday, February 8, 2013 1:38 PM
Hi Bleak.
I assume you run VS 2012. The LocalDB that you want is already installed along with VS 2012. You can check the picture at bottom. We can set aside the issue about non-existing "DataDirectory|aspnetdb.mdf". You will need to recover your SQL Server Express database installation. Please repair Visual Studio 2012 to get it back.
Please feel free to let me know if you run into other issues.
Forrest Guo | MSDN Community Support | Feedback to manager
Tuesday, February 12, 2013 6:19 AM
I managed to see the message in your original post. It's indeed about SQL express database upgrade suggestion. I have two points about the question:
- The fact that you cannot find *.mdf indicates your web application lost the database file some how. From the database connection string, the mdf database should resides in: DataDirectory|aspnetdb.mdf You will need to find the complete solution
- To upgrade an database from SQL 2008 Express to LocalDB Express, follow: VS 2012 Tools menu > Connect to Database > In Change Data Source dialog, > select Microsoft Sql Server Database File > in Add connection dialog, browse the SQL *.mdf file > OK
Hope this helps.
Forrest Guo | MSDN Community Support | Feedback to manager
Wednesday, April 3, 2019 4:08 PM
I know this is an old post but if I solved the issue by clicking on the "Microsoft Download Center" and downloading the SQL Server 2012, LocalDB, version and installing it; just follow the "Microsoft Download Center" link.
For me the link was https://www.microsoft.com/en-us/download/details.aspx?id=29062