title: MSDeploy/WebDeploy - Deploy Composite Database Project via DacPac
body: <p>We have a database project with views which join to tables in another database.  The other database is in a different solution.  This failed to build until we added a reference to a DacPac from the other database.  I believe these views are considered “Composite Database Objects” because they reference objects not included as scripts in the database but rather referenced in the DacPac.  We can successfully deploy this project from the VS to the target database.</p>
  
  <p>Now we are trying to automate the deployment via MSDeploy.   We have successfully deployed non-Composite database projects using DacPacs in the past by creating a package from a manifest. For example:</p>
  
  <p>
    
  </p>
  
  <p>But in this case the deployment fails with the following error:</p>
  
  <blockquote>
    <p>Error SQL0: The reference to external elements from the source named
    'Other.dacpac' could not be resolved, because no such source is
    loaded.  Warning SQL72025: No file was supplied for reference
    Other.dacpac; deployment might fail. When package was created, the
    original referenced file was located D:\BUILDS\6\CORE SERVICES\ACME DB
    (DEV2-DEPLOY)\SOURCES\ACME.SQLDEPLOY\DACPACS\Other.DACPAC.</p>
    
    <p>Error: An error occurred while adding references.  Deployment cannot
    continue. Error count: 1.</p>
  </blockquote>
  
  <p>Is there a trick to make sure the referenced DacPac makes it into the package and the deployment completes successfully?</p>