title: Could not deploy package "Microsoft.SqlServer.Dac.DacServicesException"
body: <p>I am using the C# DacPac Service to Update Database.</p>
  
  <p>Same code successfully working while run dacpac file for update database in sql server 2012 through c# but not working in sql server 17.9.1.</p>
  
  <p>I am encountering the below error when attempting to update a DACPAC file to a SQL Server v17.9.1.</p>
  
  <pre><code>Microsoft.SqlServer.Dac.DacServicesException
  Message : Could not deploy package.
  StackTrace :    at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)
     at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken, DacLoggingContext loggingContext)
     at Microsoft.SqlServer.Dac.DacServices.Deploy(DacPackage package, String targetDatabaseName, Boolean upgradeExisting, DacDeployOptions options, Nullable`1 cancellationToken)
     at VersionUpgradedacpac.Form1.Deploy(String DatabaseFilePath, String ConnectionString, String deployDatabaseName) in D:\dev\ProteaPhase1\ProteaExtractUpdateUtility\ProUpdateUtility\Form1.cs:line 555
  Microsoft.Data.Tools.Schema.Sql.Deployment.DeploymentFailedException
  Message : Unable to connect to target server.
  StackTrace :    at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentEndpointServer.OnInit(ErrorManager errors, String targetDBName)
     at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment..ctor(SqlDeploymentConstructor constructor)
     at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentConstructor.ConstructServiceImplementation()
     at Microsoft.SqlServer.Dac.DacServices.CreatePackageToDatabaseDeployment(String connectionString, IPackageSource packageSource, String targetDatabaseName, DacDeployOptions options, ErrorManager errorManager)
     at Microsoft.SqlServer.Dac.DeployOperation.&lt;&gt;c__DisplayClass3.&lt;&gt;c__DisplayClass5.&lt;CreatePlanInitializationOperation&gt;b__1()
     at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action)
     at Microsoft.SqlServer.Dac.DeployOperation.&lt;&gt;c__DisplayClass3.&lt;CreatePlanInitializationOperation&gt;b__0(Object operation, CancellationToken token)
     at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
     at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
  </code></pre>