TALXIS.DevKit.Build.Dataverse.PdPackage 1.6.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package TALXIS.DevKit.Build.Dataverse.PdPackage --version 1.6.1
                    
NuGet\Install-Package TALXIS.DevKit.Build.Dataverse.PdPackage -Version 1.6.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TALXIS.DevKit.Build.Dataverse.PdPackage" Version="1.6.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TALXIS.DevKit.Build.Dataverse.PdPackage" Version="1.6.1" />
                    
Directory.Packages.props
<PackageReference Include="TALXIS.DevKit.Build.Dataverse.PdPackage">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TALXIS.DevKit.Build.Dataverse.PdPackage --version 1.6.1
                    
#r "nuget: TALXIS.DevKit.Build.Dataverse.PdPackage, 1.6.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TALXIS.DevKit.Build.Dataverse.PdPackage@1.6.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TALXIS.DevKit.Build.Dataverse.PdPackage&version=1.6.1
                    
Install as a Cake Addin
#tool nuget:?package=TALXIS.DevKit.Build.Dataverse.PdPackage&version=1.6.1
                    
Install as a Cake Tool

TALXIS.DevKit.Build.Dataverse.PdPackage

MSBuild integration for Power Platform Package Deployer (PD) packages. Wraps Microsoft.PowerApps.MSBuild.PDPackage, adds ILRepack-based assembly merging for the deployment package DLL, and provides Configuration Migration Tool (CMT) package discovery, metadata merging, and zipping.

Installation

<PackageReference Include="TALXIS.DevKit.Build.Dataverse.PdPackage" Version="0.0.0.1" PrivateAssets="All" />

Or use the SDK approach:

<Project Sdk="TALXIS.DevKit.Build.Sdk/0.0.0.1">
  <PropertyGroup>
    <ProjectType>PdPackage</ProjectType>
  </PropertyGroup>
</Project>

How It Works

Microsoft PDPackage import

Props and targets from Microsoft.PowerApps.MSBuild.PDPackage are imported automatically. The version is controlled by PdPackageMsBuildVersion.

Defaults for ProjectReference

All ProjectReference items default to ReferenceOutputAssembly=false via ItemDefinitionGroup. PDPackage projects reference other projects (e.g. Solution) purely for build ordering and packaging, not to consume their output assemblies as compile-time references. Override per-reference by explicitly setting ReferenceOutputAssembly="true".

.NET Framework references

System.ComponentModel.Composition is automatically referenced when targeting .NET Framework. This is required by Microsoft.CrmSdk.XrmTooling.PackageDeployment (MEF / IImportPackageExtension).

Project reference filtering

_DetectPdProjectReferenceTypes probes all ProjectReference items for GetProjectType. Solution-type references have ReferenceOutputAssembly set to false so their DLLs are not included in the package output.

ImportConfig auto-generation

ImportConfig.xml is not required to exist in the project. If <AssetsSrcDirectory>ImportConfig.xml is missing, a skeleton (<configdatastorage> with empty <solutions>, <filestoimport>, <filesmapstoimport>) is generated in $(IntermediateOutputPath)<FolderName>/ImportConfig.xml before MSBuild validation runs, and @(PdImportConfig) is rewired to point at it. <FolderName> is read from the GetImportPackageDataFolderName property of any ImportExtension-derived class found in the project's top-level .cs files (default PkgAssets).

When AutoGeneratePdImportConfig is true (default) and the source ImportConfig.xml contains no <configsolutionfile> entries, the <solutions> section is generated automatically from the project's solution references. Both <ProjectReference> items pointing at Solution projects and <PackageReference> items pointing at pp-solution NuGet packages are picked up, and each one produces a <configsolutionfile> entry with requiredimportmode="async".

The generated entries appear in the same order as the references are declared in the .csproj file, walking <PackageReference> and <ProjectReference> items in document order (interleaved). A PackageReference is matched by its package id; a ProjectReference is matched by the csproj file name (without extension), which by convention equals the solution unique name. Any <configsolutionfile> element that can't be matched against a csproj reference is moved to the end while keeping its relative position.

If you ship a hand-written PkgAssets/ImportConfig.xml with explicit <configsolutionfile> entries, auto-generation is skipped entirely and your file is used as-is.

Assembly merge

AssemblyMergeDependencies (runs after Build via _AssemblyMergePackageDependenciesAfterBuild) merges dependency DLLs into the main output assembly using the shared ILRepack engine from TALXIS.DevKit.Build.Dataverse.Tasks. PdPackage defaults to a different exclude list than Plugin/WorkflowActivity — Newtonsoft.Json is not excluded because the package-deployer runtime doesn't provide it. Can be disabled with <AssemblyMergeSkip>true</AssemblyMergeSkip>.

CMT package discovery

DiscoverCmtPackages scans for folders containing [Content_Types].xml with sibling data.xml and data_schema.xml. Supports include/exclude filtering via IncludedCmtPackages/ExcludedCmtPackages.

CMT package zipping

_ZipCmtPackagesAfterBuild (runs after Build) zips each discovered CMT package directory into CmtPackageOutputDir.

CMT metadata merging

_PrepareCmtMetadataBeforePublish merges data.xml and data_schema.xml from all CMT packages into a single combined package, generates [Content_Types].xml, zips it, and appends a reference to ImportConfig.xml.

Publishing and NuGet packing

dotnet publish is the primary build command. It publishes the project, generates the .pdpkg.zip via GeneratePdPackage, and then automatically runs Pack to produce a .nupkg containing the .pdpkg.zip (controlled by GeneratePackageOnPublish).

MSBuild Properties

PDPackage

Property Default Description
PdPackageMsBuildVersion 1.50.1 Version of Microsoft.PowerApps.MSBuild.PDPackage imported by the package.
PdPackageTargetFileName $(PackageId).pdpkg.zip Name of the produced .pdpkg.zip.$(PackageId) falls back PackageId → AssemblyName → .csproj name.
GeneratePdPackageOnBuild true Runs GeneratePdPackage after publish.
GeneratePackageOnPublish true Triggers NuGet pack after dotnet publish to produce a .nupkg containing the .pdpkg.zip.

Assembly merge

Property Default Description
AssemblyMergeSkip (unset) When true, skips the post-build AssemblyMergeDependencies ILRepack step.
AssemblyMergeExcludes mscorlib;netstandard;Microsoft.Xrm.Sdk;Microsoft.Crm.Sdk.Proxy Semicolon-separated assembly filenames (without .dll) to exclude from merging. Note: PdPackage does not exclude Newtonsoft.Json by default (unlike Plugin/WorkflowActivity) because the package-deployer runtime doesn't provide it. Prefix patterns Microsoft.Xrm.Sdk.* and System.* are always excluded.

Validation

Property Default Description
SkipPcfDependencyValidation (unset) When true, skips the _ValidatePcfDependenciesAfterPackage check after publish.
IgnoredPcfPrefixes (unset) Semicolon-separated PCF control prefixes to exclude from dependency validation.

CMT packages

Property Default Description
CmtPackageSearchRoot Project directory Root folder scanned for CMT packages.
CmtPackageOutputDir $(TargetDir)\CmtPackages Output folder for zipped CMT packages.
IncludedCmtPackages (none) Semicolon-separated package names to include (case-insensitive).
ExcludedCmtPackages (none) Semicolon-separated package names to exclude (case-insensitive).

CMT metadata merge

Property Default Description
CmtPackageName (none) Name injected into merged metadata.
CmtMetadataOutputDir $(IntermediateOutputPath)\CmtMetadata\$(CmtMetadataZipName) Temp folder for merged metadata.
CmtMetadataZipName $(CmtPackageName) or MainCmtPackage Name of the merged metadata zip.
CmtMetadataLcid (none) LCID used when appending metadata to ImportConfig.
CmtMetadataUserMapFileName (none) Optional user map file name used in ImportConfig.
CmtImportConfigPath (none) Path to ImportConfig.xml used for metadata injection.
AutoGeneratePdImportConfig (none) When true, uses the generated ImportConfig instead of copying a project file.
PdAssetsTargetFolder (none) Target folder under publish assets for the merged metadata zip.
  • Depends on: Microsoft.PowerApps.MSBuild.PDPackage, ILRepack.Lib.MSBuild.Task, TALXIS.DevKit.Build.Dataverse.Tasks
  • Typically references: TALXIS.DevKit.Build.Dataverse.Solution projects
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.7.0 0 7/7/2026
1.6.1 281 6/29/2026
1.6.0 110 6/27/2026
1.5.1 170 5/26/2026
1.5.0 413 5/26/2026
1.4.0 386 5/14/2026
1.3.0 157 5/14/2026
1.2.2 260 5/4/2026
1.2.1 169 5/4/2026
1.2.0 165 5/4/2026
1.1.0 174 5/1/2026
1.0.0 174 4/29/2026
0.0.0.16 174 4/28/2026
0.0.0.15 184 4/26/2026
0.0.0.14 192 4/25/2026
0.0.0.13 325 3/13/2026
0.0.0.12 242 3/11/2026
0.0.0.11 250 3/6/2026
0.0.0.10 355 2/24/2026
0.0.0.9 289 2/12/2026
Loading failed