Registering a SSDT database project as a data tier application fails
I had this error recently so I'll add my solution for anyone else who comes across this,

Turns out in my publish.xml I had RegisterDataTierApplication set to True. The first time I published the database it worked fine, but then I got the same error, as the database was already registered as a Data Tier application.

By setting to false (or unchecking the checkbox in the gui) it works fine.

 &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
  &lt;PropertyGroup&gt;
    &lt;IncludeCompositeObjects&gt;True&lt;/IncludeCompositeObjects&gt;
    &lt;TargetDatabaseName&gt;foo&lt;/TargetDatabaseName&gt;
    &lt;DeployScriptFileName&gt;foo.sql&lt;/DeployScriptFileName&gt;
    &lt;BlockWhenDriftDetected&gt;False&lt;/BlockWhenDriftDetected&gt;
    &lt;RegisterDataTierApplication&gt;False&lt;/RegisterDataTierApplication&gt;
    &lt;ProfileVersionNumber&gt;1&lt;/ProfileVersionNumber&gt;
    &lt;TargetConnectionString&gt;Data Source=foo;Integrated Security=True;Pooling=False&lt;/TargetConnectionString&gt;
  &lt;/PropertyGroup&gt;
&lt;/Project&gt;




As a note about extracting the dacpac - you will always get an error if extracting via ssms,

If you use the SQL Server Object Explorer in VisualStudio, you can set more options, including unchecking the 'Verify Extraction' option, which will then allow you to create the dacpac.