If you have multiple developers working in a SQL Server Database Project and not all developers have applied the latest update they may see the following compilation error message for the System Database references: master and msdb.
Project ‘[project_name].sqlproj’ contains an invalid database reference: ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\120\SqlSchemas\master.dacpac’. You must update the reference so that it identifies a database project whose version of SQL Server matches the version on which your referencing database project is based or add server and database variables to make any references to this project a 4 part name.
Project ‘[project_name].sqlproj’ contains an invalid database reference: ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\120\SqlSchemas\msdb.dacpac’. You must update the reference so that it identifies a database project whose version of SQL Server matches the version on which your referencing database project is based or add server and database variables to make any references to this project a 4 part name.
You will need to deploy the latest version of SQL Server Data Tools (SSDT) on all of the developers’ workstations that are working with the SQL Server Database Project so everyone has the same version/release of the schema dacpac files.

SQL Server Schemas
After SSDT has been updated/installed you can see these files have been updated and your database project should compile without errors.
If you are unable to install the latest version of SSDT you can always remove the references and add them again but this time selecting the checkbox “Supress errors caused by unresolved references in the referenced project“.

Add Database Reference – Supress errors
If you’re curious where these files are located on your workstation, if you are using VS 2015 and targetting SQL Server 2014 you can find them here:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\120\SQLSchemas
The exact location which is relevant to your environment and project will be displayed in the compile error as shown at the beginning of the post.

SQL Schemas – After September 2016 SSDT installed
No comments yet... Be the first to leave a reply!