03 - Frequent Errors

1. Could not load file or assembly 'Microsoft.SqlServer.BatchParser

The Microsoft SQL Server Shared Management Objects are not fully installed (LayerCake Generator dependency).

You have to install the Shared SQL Server Management Objects.

2. Cannot find the 'Default' connectionString using ConfigurationManager.ConnectionStrings["Default"]

The connection string cannot be found in the application configuration file.

The project must have the application configuration file (App.config or Web.config) with

<?xml version="1.0" encoding="utf-8" ?>
    <add name="Default" 
      connectionString="Data Source=localhost;Initial Catalog=Labs;Integrated Security=SSPI;" />

3. SQL71501: Procedure: [dbo].[...] has an unresolved reference to object [dbo].[TABLE].[COLUMN]

The Database Project is not up-to-date.

Execute the Compare/Update operation to the Database Project using the dbo\SqlSchemaCompare\SqlSchemaCompare.DEV.scmp file.

4. 04018: The "SqlBuildTask" task failed unexpectedly

Your SQL Server Data Tools version is outdated.

Install the latest version of SQL Server Data Tools from Microsoft's site.

5. Database Project > Compare Schemas > Cannot generate deployment plan

1. Close Visual Studio and delete the dbml file in the Database Project. Then try again.

2. If it does not work try to switch the Source and Target and execute the compare operation again (and switch back according to your need).

6. Failed to create extension manager for the target platform. 'Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider'

Edit the Database Project sqlproj file with text editor and change the requirement to a lower version