Skip to content
This repository was archived by the owner on Feb 9, 2024. It is now read-only.
This repository was archived by the owner on Feb 9, 2024. It is now read-only.

Contributor DLL in DACPAC package folder does not load automatically #41

Open

Description

I see from #25 that DacFX should support automatically loading contributor DLLs from the same directory as the DACPAC. However, I have not been able to get that to work.

I can successfully get the third method introduced in that issue - specifying the path as a parameter to sqlpackage.exe - to work.

Example command line that works:

sqlpackage /Action:Publish /Profile:Database.publish.xml /TargetDatabaseName:Northwind /TargetServerName:MyDatabaseServer /p:AdditionalDeploymentContributors=CompanyName.DeploymentFilterContributor /SourceFile:Database.dacpac /p:AdditionalDeploymentContributorPaths=D:\SsdtTesting

My DACPAC file is in D:\SsdtTesting, with the contributor DLL alongside it. The above works as expected. But leaving off that last parameter causes it to fail:

*** An error occurred during deployment plan generation. Deployment cannot continue.
Error SQL0: Required contributor with id 'InternalApps.DeploymentFilterContributor' could not be loaded.

This is with a Windows (non-.NET Core) install of DacFX 18.3.1 (since that's the version currently installed on Microsoft's hosted pipeline agents, my eventual target).

Please let me know if there's any more information I can provide.

Activity

  1. kchenery commented on Aug 19, 2020

    @kchenery
    Contributor

    Can confirm I get the same. With the .Net Core version (on Windows) I can only get it to load from the path C:\Program Files (x86)\Microsoft SQL Server\150\DAC\bin\Extensions even though my sqlpackage.exe is located elsewhere (c:\bin\sqlpackage\sqlpackage.exe to be exact).

    Sepicfying the /p:AdditionalDeploymentContributorPaths parameter does not seem to make any difference at all.

    I've tested this on various versions of SqlPackage on both Windows and Linux and all ignore the supplied path.

    Can only get it to load custom deployment contributors on Windows with the default path above. Managed to load it on Linux if I put the dll in the same folder as SqlPackage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions