This error occurred to me in Visual Studio 2013 while create connection to local AdventureWorks 2012 mdf file.
This database file is not compatible with the current instance of SQL Server. To resolve this issue, you must upgrade the database file by creating a new data connection, or you must modify the existing connection to this database file. For more information, see http://go.microsoft.com/fwlink/?LinkId=235986
In order to upgrade the database, just follow steps described under the link above:
To upgrade a database file to use LocalDB
- In Server Explorer, choose the Connect to Database button.
- In the Add Connection dialog box, specify the following information:
- Data Source: Microsoft SQL Server (SqlClient)
- Server Name: (LocalDB)\v11.0
- Attach a database file: Path, where Path is the physical path of the primary .mdf file.
- Logical Name: Name, where Name is the name that you want to use with the file
- Choose the OK button.
- When prompted, choose the Yes button to upgrade the file
The database is upgraded, attached to the LocalDB database engine, and no longer compatible with SQL Server 2008 Express.