After updating visual studio - DACPAC deployment through C# app in debug fails

  • Thread starter Thread starter Auticus
  • Start date Start date
A

Auticus

Guest
Within C# windows application, we have a SQL express 2012 database server that runs alongside.

We use DACPAC to upgrade and deploy new databases from within the application using the DacServices object.

ie: DacServices.Deploy

We are currently on Microsoft.SqlServices.Dac.dll version 12.0.3021.1. That appears to be the latest that I can find.

Manually running the dacpac in SSMS works fine. Running through the application worked fine until recently. Now we get the following exception when trying to deploy through the C# application in debug mode (preventing us from troubleshooting our application) - using Visual Studio 2017:


{Microsoft.Data.Tools.Schema.Sql.Deployment.DeploymentFailedException: Internal Error. The database platform service with type Microsoft.Data.Tools.Schema.Sql.Sql110DatabaseSchemaProvider is not valid. You must make sure the service is loaded, or you must provide the full type name of a valid database platform service. ---> Microsoft.Data.Tools.Schema.Extensibility.ExtensibilityException: Internal Error. at Microsoft.Data.Tools.Schema.Extensibility.ExtensionTypeLoader.InstantiateDatabaseSchemaProvider(String databaseSchemaProviderType) at Microsoft.Data.Tools.Schema.Extensibility.ExtensionManager.UpdateExtensions() at Microsoft.Data.Tools.Schema.Extensibility.ExtensionManager..ctor(String databaseSchemaProviderType) at Microsoft.Data.Tools.Schema.Extensibility.ExtensionManager.<>c__DisplayClass3.b__2() at System.Lazy1.CreateValue() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Lazy1.get_Value() at Microsoft.Data.Tools.Schema.Extensibility.ExtensionManager.GetExtensionManager(String dsp) at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.CreateExtensionManagerFromModel(SqlPackage package) --- End of inner exception stack trace --- at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.CreateExtensionManagerFromModel(SqlPackage package) at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentEndpointPackage.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.<>c__DisplayClass3.<>c__DisplayClass5.b__1() at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action) at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass3.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)}

NUGET from Microsoft actually has a lesser version of the version 12 dll and I can't see where it would have been updated to a greater version to try and get latest version. (also downgrading to Microsoft's latest dac dll on NUGET does not fix the isssue)

I suspect a windows update came through and broke our development builds but have no way to prove that and cannot find any information. Additionally this started happening when we updated our visual studios to the latest update (currently running Visual Studio 2017)

Does anyone have any insight?

Continue reading...
 
Back
Top