You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment (local platform and source/target platforms): windows server 2022
We created a sqlpackage contributor extension (DeploymentPlanModifier) to filter objects during the deployment of a dacpac.
On our development environment (with VS2022 installed) this works fine.
Steps to Reproduce:
We copied the signed dll and pdb from our VS2022 project to the extensions folder of sqlpackage (C:\Program Files\Microsoft SQL Server\160\DAC\bin\Extensions) to the remote machine
Verified that these files are unblocked
Added 'AdditionalDeploymentContributors' argument to sqlpackage.exe to include the extension
Run the deployment in a Devops Release pipeline, calling sqlpackage on the remote machine
We get a ReflectionTypeLoadException, probably indicating a missing reference!?
SafeDirectoryCatalog: Extensibility failed to load DLL 'C:\Program Files\Microsoft SQL Server\160\DAC\bin\Extensions\ContributorSubfolder\OurContributor.dll' due to an exception System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetEnumerator()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at Microsoft.SqlServer.Dac.Extensibility.DacExtensionHelper.TryLoadAssemblyCatalog(String file, ComposablePartCatalog& catalog)
Can anyone give an indication on how to solve this issue??
Did this occur in prior versions? If not - which version(s) did it work in?
(DacFx/SqlPackage/SSMS/Azure Data Studio)
The text was updated successfully, but these errors were encountered:
Interesting. Is the version of SqlPackage in your development environment (from Visual Studio 2022) the same as SqlPackage in your deployment environment? Ideally, they're both 162.x but validating that they're the same helps narrow down the reproducibility. @zijchen for assembly loading expertise
On the environment it does work, sqlpackage version 16.1.6374.0 is installed.
Where it doesn't work, version 16.0.6296
Comparing the 2 enviroments it looks al the same to us; .Net 4.8 installed (created the contributor in this version), sqlpackage and the dll installed in the exact same place (C:\Program Files\Microsoft SQL Server\160\DAC\bin\Extensions\SubFolder\OurContributor.dll), except for the version of sqlpackage...
We created a sqlpackage contributor extension (DeploymentPlanModifier) to filter objects during the deployment of a dacpac.
On our development environment (with VS2022 installed) this works fine.
Steps to Reproduce:
We get a ReflectionTypeLoadException, probably indicating a missing reference!?
Can anyone give an indication on how to solve this issue??
Did this occur in prior versions? If not - which version(s) did it work in?
(DacFx/SqlPackage/SSMS/Azure Data Studio)
The text was updated successfully, but these errors were encountered: