How to: Build Data-tier Application Projects

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.

A data-tier application (DAC) project is single unit of management for developing and deploying all of the SQL Server data-tier objects used by an application. You build the project to create a DAC package file, which can be used to deploy the DAC to an instance of SQL Server 2008 R2.

To change the data-tier application build settings

  1. In Solution Explorer, select the DAC project for which you wish to set properties.

  2. Use one of these steps to open the project property pages:

    • In Solution Explorer, right-click the DAC project and select Properties.

    • On the View menu, select Property Pages.

    • On the Project menu, select projectname Properties…

  3. Select the Build tab.

  4. In Database collation, specify the default collation that will be assigned to the database created to hold the objects defined in the DAC when the DAC is deployed.

  5. In Build output path, specify the path structure for the DAC package file created by the build process.

  6. In Build output file name, specify the name for the DAC package file created by the build process.

  7. Select the Build Events tab.

  8. Select the Edit Pre-build… button to specify a command line command to be run before each build.

  9. Select the Edit Post-build… button to specify a command line command to be run after each build.

  10. In Run the post-build event, specify whether you want the post-build command to be run after every build, or only if the build was successful.

To build a data-tier application project

  • There are two ways to build a DAC project:

    • On the Build menu, click Build DACProjectName.

    • In Solution Explorer, right-click the node for the DAC project, and then select Build.

    The project is built and the DAC package created.

    The Output window contains a report of the actions taken by the build, including the full path to the location of the DAC package file created by the build. The location and name of the DAC package file are controlled by the build settings in the DAC project properties.

    If you build the solution containing the DAC project, the DAC project is also built.

See Also

Concepts

Building Data-tier Application Projects

Data-tier Application Project Properties

Deploying Data-tier Application Packages