How to pack deployment depot in dacpac?

I cannot find any links on how to pack the deployment contributor in dacpac.

So my question is how to specify these contributors to deploy to dacpac?

I tried to put the deployment developer class in the SSDT project in Visual Studio, but this interferes with the CLR assembly loading into SQL Server (i.e. it loads into SQL Server and if its dependencies also don't load, an error occurs).

Please inform. Thank you.

+4
source share
1 answer

To add to dacpac that you want to load a specific contributor, you need to manually edit the .sqlproj file and add this:

<PropertyGroup> <DeploymentContributors>$(DeploymentContributors);AgileSqlClub.DeploymentPlanLogger</DeploymentContributors> </PropertyGroup>

after

<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" /> Change "AgileSqlClub.DeploymentPlanLogger" so that your contributor exports his name as (for example, [ExportDeploymentPlanModifier ("AgileSqlClub.DeploymentPlanLogger", "0.1.0.0")])

xml , "Origin.xml" dacpac :

<RequiredContributors> <DeploymentContributor Name="AgileSqlClub.DeploymentPlanLogger" Version="0.1.0.0" /> </RequiredContributors> </DeploymentContributors>

, , - , , ? !

, dacpac, , script. :

, dacfx , , :

Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @ "Microsoft SQL Server\120\DAC\bin\Extensions" )

, "c:\program files (x86)\Microsoft SQL Server\120\DAC\bin\Extensions".

, , dacpac, , , :

http://agilesqlclub.codeplex.com/wikipage?title=Deploying&referringTitle=Documentation

. " SSDT":

( vs 2015 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\120\Extensions)

, , , , ( dll hell .net lol)

, ?

OSS, :

https://github.com/DacFxDeploymentContributors/Contributors

Ed

+1

Source: https://habr.com/ru/post/1622013/


All Articles