Core MSBuild tasks and targets library shared by all TALXIS.DevKit.Build.Dataverse.* packages. Provides custom C# MSBuild tasks for Git-based version generation, solution XML patching, solution packaging via PAC CLI, schema validation, CMT data merging, code app metadata generation, and web resource management. Most users do not reference this package directly -- it is pulled in as a dependency of the higher-level packages (Plugin, Solution, Pcf, etc.).
<PackageReference Include="TALXIS.DevKit.Build.Dataverse.Tasks" Version="0.0.0.1" PrivateAssets="All" />Typically this package is referenced transitively through one of the component packages.
The package ships compiled task assemblies for net472 and net6.0. At build time, the correct assembly is selected based on MSBuildRuntimeType (Core vs Full Framework).
| Category | Tasks |
|---|---|
| Versioning | GenerateGitVersion, ApplyVersionNumber, ApplyPcfVersionNumber, ApplyPluginVersionNumberInSolution |
| Solution packaging | InvokeSolutionPackager, PatchSolutionXml, EnsureCustomizationsNode, EnsureAllCustomizationsNodes |
| Component metadata | EnsurePluginAssemblyDataXml, EnsureWorkflowActivityAssemblyDataXml, EnsureWebResourceDataXml, AddRootComponentToSolution, GenerateCodeAppMetaXml |
| Validation | ValidateXmlFiles, ValidateJsonFiles, ValidateDuplicateGuids, ValidateQuickFindViews, ValidatePcfDependencies |
| CMT data | MergeCmtDataXml, MergeCmtDataSchemaXml, AppendCmtDataFileToImportConfig, PostProcessImportConfig |
| Utilities | RetrieveProjectReferences, ResolveWebResourceName |
- GenerateVersionNumber -- requires the
Versionproperty. RunsGenerateGitVersionusing the major/minor fromVersion, the current Git branch, andApplyToBranchesrules to produce a full four-part version number. - ApplyVersionNumber -- patches the generated version into solution metadata folders (
SolutionXml,PluginAssemblies,Workflows,Controls,SdkMessageProcessingSteps). - ApplyPcfVersionNumber -- updates the version in
ControlManifest.xmlfor PCF controls. - PackDataverseSolution -- invokes the PAC solution packager to produce a
.zipfrom the working directory. - ValidateSolutionComponentSchema -- validates all solution XML files against bundled XSD schemas (22 schemas covering Solution, Entity, Form, Ribbon, Relationship, AppModule, Sitemap, OptionSet, Workflow, PluginAssembly, and more) and JSON files against JSON schemas (
Flow.schema.jsonfor Power Automate flows). Runs in batch mode -- collects all errors across all files before failing the build, with MSBuild-canonical error format (file(line,col): error CODE: message) for IDE click-through support. - InitializeSolutionPackagerWorkingDirectory -- copies solution source files into the intermediate working directory for packaging.
- CleanupWorkingDirectory -- removes temporary localization and working directories after build.
The ValidateXmlFiles and ValidateJsonFiles tasks ship with 22 XSD schemas and 1 JSON schema covering all Dataverse solution component types. Schemas are bundled in the NuGet package under contentFiles/ValidationSchema/.
All XSD schemas share the null target namespace and are loaded into a single XmlSchemaSet, so cross-schema type references (e.g. CrmCascadeSecurityLinkType defined in Customizations.xsd but used in Relationship.xsd) are resolved automatically at compile time.
Error codes emitted by validation tasks:
| Code | Task | Meaning |
|---|---|---|
TALXISXSD001 |
ValidateXmlFiles |
XML file violates its XSD schema. |
TALXISXML001 |
ValidateXmlFiles |
XML file is not well-formed. |
TALXISJSON001 |
ValidateJsonFiles |
JSON file is not valid JSON. |
TALXISJSONSCHEMA001 |
ValidateJsonFiles |
JSON file violates its JSON schema. |
Tip
Schema validation is not wired into the build pipeline automatically. To run it, invoke the TalxisValidateSolutionComponentSchema target manually, e.g. dotnet build -t:TalxisValidateSolutionComponentSchema.
| Property | Default | Description |
|---|---|---|
Version |
(required) | Base version (Major.Minor); used by GenerateGitVersion to produce the full version. |
ApplyToBranches |
(none) | Semicolon-separated branch rules (e.g. master;hotfix;develop:1;pr:3;feature/*:2). |
LocalBranchBuildVersionNumber |
0.0.20000.0 |
Fallback version used when the current branch does not match ApplyToBranches. |
| Property | Default | Description |
|---|---|---|
SolutionRootPath |
. |
Relative path to the solution source root. |
SolutionPackagerWorkingDirectory |
$(IntermediateOutputPath) |
Working folder for pack/unpack operations. |
SolutionPackagerMetadataWorkingDirectory |
$(SolutionPackagerWorkingDirectory)Metadata |
Metadata folder used by version update targets. |
SolutionPackagerLocalizationWorkingDirectory |
(none) | Optional localization working folder (cleaned by CleanupWorkingDirectory). |
SolutionPackageLogFilePath |
$(IntermediateOutputPath)SolutionPackager.log |
SolutionPackager log file path. |
SolutionPackageZipFilePath |
$(OutputPath)$(MSBuildProjectName).zip |
Output path for the packed solution .zip. |
| Property | Default | Description |
|---|---|---|
PcfOutputPath |
(none) | Output directory containing ControlManifest.xml (used by ApplyPcfVersionNumber). |
This is the foundational package in the ecosystem. The following packages depend on it:
TALXIS.DevKit.Build.Dataverse.PcfTALXIS.DevKit.Build.Dataverse.PluginTALXIS.DevKit.Build.Dataverse.WorkflowActivityTALXIS.DevKit.Build.Dataverse.ScriptLibraryTALXIS.DevKit.Build.Dataverse.CodeAppTALXIS.DevKit.Build.Dataverse.SolutionTALXIS.DevKit.Build.Dataverse.PdPackage