HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

SqlPackage.exe: Error SQL0: Required contributor with id 'id' could not be loaded

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
exeerrorwithcouldcontributorloadedsqlpackagenotrequiredsql0

Problem

while trying to build dacpac using sqlpackage.exe, we are getting the following error

Microsoft.SqlServer.Dac.DacServicesException: An error occurred during deployment plan generation. Deployment cannot continue.
Error SQL0: Required contributor with id 'BcDevKit.DeploymentContributors.DacMacroSqlDeploymentContributor' could not be loaded.


The above error can be fixed if I copy the contributors from
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150\Extensions


to C:\Program Files (x86)\Microsoft SQL Server\150\DAC\bin\Extensions

I want sqlpackage to search for contributors only in Visual Studio directory. Can anyone help?

Solution

I have figured the answer on my own and wanted to help someone like me.

So, the problem is I was referencing sqlpackage.exe from C:\Program Files (x86)\Microsoft SQL Server\150\DAC\bin directory, that is why it was looking for the contributor in it's sub-directory \Extensions.

I was looking around in Visual Studio installation directory and found the sqlpackage.exe in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150 directory, updated the path in environment variables and it worked.

Context

StackExchange DevOps Q#9131, answer score: 2

Revisions (0)

No revisions yet.