The SQL Server Data Tools team blog mentions that it is now possible to use MsBuild to perform a schema comparison of two DacPacs or databases. However, they do not mention exactly how to pass in the connection string to the source and target database. If I set the parameter /p:source="my connection string" I get the error:
MSBUILD : error MSB4177: Invalid property. The name "Initial Catalog" contains an invalid character " ".
The command-line my PowerShell script sends to msbuild is:
msbuild ".\SchemaCompare.proj" /t:SqlSchemaCompare
/p:source="$sourceConnString" /p:target="$targetConnString"
/p:XmlOutput="$schemaCompareReportPath"
where the SchemaCompare.proj contains the content suggested on the SQL Server Data Tools team blog