title: "This database file is not compatible with the current instance of SQL Server"
body: <p>I am currently reading through a book about MVVM and I need to use the Northwind database for the next section. Unfortunately, when I try to add Northwind to my project, I get the following error:</p>
  
  <blockquote>
    <p>"An error occurred while connecting to the database. The database might be unavailable. An exception of type 'Microsoft.Data.ConnectionUI.SqlDatabaseFileUpgradeRequiredException' occurred. The error message is: 'This database file is not compatible with the current instance of SQL Server.'"</p>
  </blockquote>
  
  <p>I haven't installed an SQL Server, just Visual Studio 2012. The book instructs me to add the .MDF file to the project, set it as an Entity Data Model, and then to generate from database. It's on the next screen where I get the error. I use NORTHWND.MDF as the data connection and the entity connection string is as follows:</p>
  
  <blockquote>
    <p>metadata=res://<em>/Model1.csdl|res://</em>/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=(LocalDB)\v11.0;attachdbfilename=|DataDirectory|\NORTHWND.MDF;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"</p>
  </blockquote>
  
  <p>In the book, this reads:</p>
  
  <blockquote>
    <p>metadata=res://<em>/Model1.csdl|res://</em>/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated Security=True;UserInstance=True"</p>
  </blockquote>
  
  <p>I have tried using both data sources and neither work.</p>
  
  <p>Also of note, the sample code that goes along with the book doesn't work either. It compiles and launches, but in the server explorer, NORTHWND.MDF has an 'x' in the icon and upon launch none of the data is there.</p>
  
  <p>When I attempt to upgrade the database, I get an error saying:</p>
  
  <blockquote>
    <p>"Database '...\NORTHWND.MDF' cannot be upgraded because its non-release version (539) is not supported by this version of SQL Server. You cannot open a database that is incompatible with this version of sqlservr.exe. You must re-create the database..."</p>
  </blockquote>
  
  <p>If anybody could give me any tips on how to get this working, I would certainly appreciate it.</p>