You receive a “Connections to SQL server files (.mdf) require SQL Server Express 2005 to function properly.” exception when adding a new SQL Server database in App_Data folder.

Extended support for SQL Server 2005 ended on April 12, 2016

If you are still running SQL Server 2005, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.


In Visual Studio, when you right click on the App_Data folder and try to add a new SQL Server database, you may receive the following exception: 

Connections to SQL Server Files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL:


Connections to SQL Server files (*.mdf) require a SQL Server user instance, which is a feature of SQL Server Express edition and is not supported by other editions of SQL Server (such as Developer or Enterprise).

In general, the exception has the following causes:

  • There is no SQL Server Express installed on the machine.
  • The SQL Server Express instance is not running.
  • Incorrect instance name of SQL Server Express is specified in Visual Studio.

Note: Because SQL Server 2008 is released after Visual Studio 2005 and Visual Studio 2008, the exception message does not include SQL Server 2008 Express.


Verify that SQL Server express edition (either 2005 or 2008 version) is properly installed and is currently running on the system. You can use SQL Server Configuration Manager to check and start the SQL instances that are installed on the system.

If the SQL Server Express instance is running, check if Visual Studio is pointing to the correct SQL instance. You can do this by navigating to Data connections under Tools -> Options in Visual Studio IDE.

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Id. de artículo: 2009225 - Última revisión: 12/15/2009 20:48:00 - Revisión: 1.0

Microsoft SQL Server 2005 Express Edition, Microsoft SQL Server 2005 Express Edition with Advanced Services, Microsoft SQL Server 2008 Express, Microsoft SQL Server 2008 Express with Advanced Services, Microsoft Visual Studio 2005 Professional Edition, Microsoft Visual Studio 2005 Standard Edition, Microsoft Visual Studio 2005 Team Suite, Microsoft Visual Studio 2008 Academic Edition, Microsoft Visual Studio 2008 Professional Edition, Microsoft Visual Studio 2008 Service Pack 1, Microsoft Visual Studio 2008 Standard Edition

  • KB2009225