Search code examples
visual-studio-2012visual-studio-2013asp.net-web-apisql-server-ce

Why is SQL Server Compact not available from Add New Item -> Data?


Why is SQL Server Compact not available from within a Web API project when right-clicking the project's "App_Date" folder and selecting Add -> New Item... -> Visual C#" -> "Data?

According to this tutorial on adding a database to an ASP.NET Web API project, there should be, not only these options there:

SQL Server Database
XML File
XML Schema

...but also "SQL Server Compact 4.0 Local Database"

Yet I only have those first three available. Why?

The tutorial linked to above was written on on May 30, 2013, and it specifies Visual Studio 2012 whereas I'm using Visual Studio 2013. Did "SQL Server Compact 4.0 Local Database" get dropped in VS 2013?

If not, how can I restore SQL Server Compact to the selection of available options?


Solution

  • Yes, SQL Compact Local Database was removed in VS 2013, but you can use the Sql Ce Toolbox to manage your database, and manually include a SQL Ce file in your web app.