Data-tier Application Project Properties

Important

To create and manage databases using the latest version of Data Tier Applications (DACPAC), install the most recent release of SQL Server Data Tools from Get Started with Microsoft SQL Server Data Tools.

You use data-tier application (DAC) project settings to control aspects of your database and build configurations. These settings fall into the following categories:

  • Project Settings

  • Build

  • Build Events

  • Deploy

  • Code Analysis

Project settings, build events, and deployment properties are stored in the DAC project and shared through version control.

Note

User-specific settings are stored in the .dbproj.user file. Project-specific settings are stored in the .dbproj file.

Project Settings

The settings in the following table apply to all configurations of this data-tier application project.

Field

Default value

Description

Project version

Data-tier application

Specifies that this is a data-tier application project.

Model collation

English (United States) (1033) - CI

Specifies the default rules by which data is sorted and compared in the underlying SQL Server Compact database that stores the model of your database. You should specify a value for this setting that is as close to your target database collation as possible. You might want to differ by case. For example, you could use a case-insensitive collation for the model and a case-sensitive collation for your database. You can override the default collation within object definitions.

NoteNote
The default collation is the same for all platforms. The default value does not change to match the current locale. You must manually set the default collation to the appropriate collation for your locale.

Default schema

dbo

Specifies the default schema in which objects are created. You can override this setting when you change one or more of the object definitions.

Include schema name in file name

Yes

Specifies whether file names include the schema as a prefix, for example, dbo.Products.table.sql. If this check box is cleared, file names for objects take the form ObjectName.ObjectType.sql

Build Settings

You can use these settings to affect the build script and the target database. These settings are specific to the configuration and platform that you specify, and they typically vary from user to user.

Field

Default value

Description

Database collation

SQL_Latin1_General_CP1_CI_AS

Specifies the collation for the DAC package. When the DAC package is deployed, the setting controls the default collation of the database associated with the DAC.

Build output path

.\sql\

Specifies where the DAC package file will be generated when you build or deploy the DAC project. If you specify a relative path, you must specify it relative to the DAC project path. If the path does not exist, it is created.

Build output file name

DACProjectName.dacpac

Specifies the name that you want to give the DAC package that is generated when you build the DAC project. If you selected the Automatically generate the build output file name check box, the automatically-generated file name overwrites any value that you specify in this field.

Build Events Settings

You can use these settings to specify a command line to execute before the build operation starts and a command line to execute after the build operation is completed.

Field

Default value

Description

Pre-build event command line

None

Specifies the command line to execute before the project is built. Click Edit Pre-build to modify the command line.

Post-build event command line

None

Specifies the command line to execute after the project is built. Click Edit Post-build to modify the command line.

Run the post-build event

On successful build

Specifies whether the post-build command line should be run always, or only if the build was successful.

For more information, see How to: Specify a Pre-build or Post-build Command Line and Pre-build Event / Post-build Event Command Line Dialog Box (Database Edition).

Deploy

You can use these settings to control the deployment of your DAC project. The settings are active only when using Visual Studio to deploy the DAC, such as when a database developer uses Visual Studio Solution Explorer to deploy a copy of the DAC to a test computer. The settings do not apply when using the SQL Server Deploy Data-tier Application Wizard to deploy a DAC, such as when a database administrator deploys a DAC to production.

Field

Default value

Description

Destination connection string

blank

Specifies the connection information for the instance of the Database Engine where you want to deploy the DAC.

Data-tier application name

DACProjectName

Specifies the name used for the deployed DAC in the SQL Server Management Studio displays and dialogs. The same name is given to the database created to hold the objects defined in the DAC.

Validate policy on target instance

Checked

Specifies whether the DAC server selection policy is evaluated when the DAC is deployed. The server selection policy defines properties, such as default collation or edition, that the instance of the Database Engine should meet to successfully host the DAC.

Code Analysis Settings

Specifies whether a static code analysis is performed when you build the DAC project. Visual Studio includes an extensible set of rules that can be applied to data-tier application and database projects. The rules check for code structures that can lead to performance problems or use deprecated syntax, and can be used to enforce site naming conventions. For more information about database code analysis, see Improving Database Code With Static Analysis.

Field

Default value

Description

Enable Code Analysis on Build

Not selected

Specifies whether or not code analysis is performed for each build of the DAC project.

Rules

Microsoft.Rules.Data.Design Microsoft.Rules.Data.Naming Microsoft.Rules.Data.Performance

Specifies the set of code analysis rules to evaluate in the build. Select the check box by each rule to activate or deactivate the rule.

Treat Warning as Error

Not selected

Specifies whether a violation of the associated rule is treated as a warning or an error. When not selected, a violation is treated as a warning. When selected, a violation is treated as an error.

See Also

Tasks

How to: Import Database Objects to Data-tier Applications