GoEddie / DeploymentContributorFilterer

MIT License
70 stars 35 forks source link

Error SQL0: Required contributor with id 'AgileSqlClub.DeploymentFilterContributor' could not be loaded #32

Closed thirstylemur closed 1 year ago

thirstylemur commented 1 year ago

having a very basic error with little to no explanation on why it's not loading. I have copied the DLL to the sqlpackage.exe directory and also tried the extensions directory as some have mentioned in other forums. (2022 doesn't have extensions folder so i tried creating that as well) but it's still not working. i could use some help figuring out why i can't get passed this

t-johnson commented 1 year ago

Putting the dll in the same folder as SqlPackage.exe should be sufficient. However, verify that the dll is not blocked - view its properties and see if it needs to be "Unblocked"

t-johnson commented 1 year ago

See also #20

thirstylemur commented 1 year ago

I don't have a button to "unblock" like in the screenshot of that post. also, i noticed that the screenshot references a different DLL than the one we're supposed to move (DeploymentFilterContributor vs SQLPackageFilter). are the instructions correct that we are moving the correct file and calling it properly?

t-johnson commented 1 year ago

@thirstylemur yes that screenshot on @20 is not showing the correct filename for this package.

This should be AgileSqlClub.SqlPackageFilter.dll

Other things to check:

thirstylemur commented 1 year ago

thanks for the quick reply

yes, i've been using the dll in the debug\net4.8 folder. i've tried this on VS 2019 and VS 2022 (putting in the correct folder for both versions where sqlpackage.exe resides). i've tried adding the dll AND the pdb files, both, to the folder with sqlpackage.exe i've made sure to execute the correct sqlpackage.exe i've run a build right after getting source so the correct dll is created (however there are several warnings but build is successful) tests do not succeed because of a connection to db (i'm a SQL developer so my experience with VS and extensions is very limited) ive given elevated permissions to the dll in properties hoping that was an issue (no block/unblock button) i've tried on another machine to rule out VS installation issues tried logging with FUSLOG but nothing came back

should this /p:AdditionalDeploymentContributors=AgileSqlClub.DeploymentFilterContributor also be changed to /p:AdditionalDeploymentContributors=AgileSqlClub.SqlPackageFilter?

t-johnson commented 1 year ago

this is the correct command-line argument: /p:AdditionalDeploymentContributors=AgileSqlClub.DeploymentFilterContributor

I'm not familiar with what comes packaged with Visual Studio... What version of SqlPackage.exe are you trying to run? If you're building this from source, it should work with the latest DacFx - version 16.

thirstylemur commented 1 year ago

it looks like i'm using version 15.0.5565

t-johnson commented 1 year ago

You'll either need to go to DacFx 16 or use the 1.4.4 release of this package then