3

I try to deploy a .dacpac package programmatically using this code:

            var dacServices = new DacServices(myConnectionString);
            using (var bacPacPackage = DacPackage.Load(dacPacFilename))
            {
                var options = new PublishOptions();
                dacServices.Publish(bacPacPackage, dbName, options);
            }

It throws an error:

Microsoft.SqlServer.Dac.DacServicesException: An error occurred during deployment plan generation. Deployment cannot continue. Error 72002: The extension type Microsoft.SqlServer.Dac.Deployment.Internal.InternalDeploymentPlanExecutor could not be instantiated. Error 72002: The extension type Microsoft.SqlServer.Dac.Deployment.Internal.InternalDeploymentPlanModifier could not be instantiated. ---> Microsoft.Data.Tools.Schema.Sql.Deployment.DeploymentFailedException: An error occurred while loading deployment contributors. bei Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.LoadDeploymentComponents() bei Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.InitializePlanGeneratator() bei Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.CreateController(Action`1 msgHandler) bei Microsoft.SqlServer.Dac.DacServices.CreateController(SqlDeployment deploymentEngine, ErrorManager errorManager) --- Ende der internen Ausnahmestapelüberwachung ---

Has anybody any suggestions whats wrong here?

Felix
  • 43
  • 6

1 Answers1

0

In my case the issue that previous automated deploy failed and left the database empty. It's weird but following dacpac runs resulted in InternalDeploymentPlanModifier could not be instantiated. The solution was to drop existing database and run the whole deploy all over.

The second thing was that there was low memory on the target server. It could also contribute to these problems.

andrew.fox
  • 7,435
  • 5
  • 52
  • 75