none
Are AdditionalDeploymentContributors supported by MSBuild? RRS feed

  • Question

  • I want to use MSBuild to compile and deploy my database project during an automated build. I also want to use the AgileSqlClub.BatchedTableMigration deployment contributor (https://the.agilesql.club/blog/Ed-Elliott/2015-11-04/Deploy-SSDT-INSERTS-in-Batches)

    It appears that MSBuild is not using the AdditionalDeploymentContributors property.

    This command line is working, and the output shows the BatchedTableMigration function getting called during the script generation:

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\120>

    c:sqlpackage /a:script  /sf:wcb_datawarehouse_db.dacpac
    /pr:D:\Builds\345\C2BIZ\DEV_CoreBI_Mike\src\BI\WCB_DataWarehouse_db\data_warehouse_test_db.publish.xml
    /p:AdditionalDeploymentContributors=AgileSqlClub.BatchedTableMigration
    /p:AdditionalDeploymentContributorArguments=BatchedTableMigrationBatchSize=100000
    /OutputPath:Mike.sql

    Generating publish script for database 'data_warehouse_test_db' on server 'blah'.
    AgileSqlClub.BatchedTableMigration: Starting...
    AgileSqlClub.BatchedTableMigration: Finished
    Successfully generated script to file D:\Builds\345C2BIZ\DEV_CoreBI_Mike\src\BI\WCB_DataWarehouse_db\bin\Debug\Mike.sql.

    This is not working, does not show the contributor code executing, and has the original table rebuild script in the generated SQL:


    c:msbuild WCB_DataWarehouse_db.sqlproj /t:Build /t:Publish 
    /p:SqlPublishProfilePath=data_warehouse_test_db.publish.xml
    /p:AdditionalDeploymentContributors=AgileSqlClub.BatchedTableMigration
    /p:AdditionalDeploymentContributorArguments=BatchedTableMigrationBatchSize=1480

    Build started 5/26/2016 11:53:30 AM.
    Project "D:\Builds\345\C2BIZ\DEV_CoreBI_Mike\src\BI\WCB_DataWarehouse_db\WCB_DataWarehouse_db.sqlproj" on node 1 (Publish target(s)).

      Deployment script generated to:
      D:\Builds\345\C2BIZ\DEV_CoreBI_Mike\src\BI\WCB_DataWarehouse_db\bin\Debug\WCB_DataWarehouse_db.publish.sql

    Am I doing something wrong or does MSBuild just not support contributors?

    Mike

    Thursday, May 26, 2016 5:11 PM