Search code examples
sql-server-data-tools

Use deployment contributor with schema compare


Is it possible to use a custom deployment contributor with the SSDT schema compare tool in Visual Studio?

In the msbuild targets file I can see the SqlSchemaCompareTask supports additional deployment contributors, but I can't see in the scmp file where I would specify any contributors.


Solution

  • When running Schema Compare from the command line MSBuild task, this is possible. From inside Visual Studio, it is not supported at this time. The AdditionalDeploymentContributors and other properties on the MSBuild task are command line overrides that update the deployment engine, but there are no built-in options for Schema Compare to use a deployment contributor. Hence there is no way to make this work when using Schema Compare in VS.

    A note on what the contributors do in this scenario: the deployment contributor could modify the final deployment plan generated by Schema Compare, once the user chooses to update/script the results. It will not change what shows up in the Schema Compare added/deleted/changed list but could alter how they actually get deployed.

    If you see a scenario where this would be useful to you and other consumers of Schema Compare, the best way to raise this is by opening a Connect DCR at https://connect.microsoft.com/SQLServer/feedback/CreateFeedback.aspx and use the category "Developer Tools(SSDT, BIDS,etc.)".

    Disclosure: I work on the SSDT team.