TALXIS.DevKit.Build.Dataverse.ScriptLibrary
1.5.1
Prefix Reserved
dotnet add package TALXIS.DevKit.Build.Dataverse.ScriptLibrary --version 1.5.1
NuGet\Install-Package TALXIS.DevKit.Build.Dataverse.ScriptLibrary -Version 1.5.1
<PackageReference Include="TALXIS.DevKit.Build.Dataverse.ScriptLibrary" Version="1.5.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="TALXIS.DevKit.Build.Dataverse.ScriptLibrary" Version="1.5.1" />
<PackageReference Include="TALXIS.DevKit.Build.Dataverse.ScriptLibrary"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add TALXIS.DevKit.Build.Dataverse.ScriptLibrary --version 1.5.1
#r "nuget: TALXIS.DevKit.Build.Dataverse.ScriptLibrary, 1.5.1"
#:package TALXIS.DevKit.Build.Dataverse.ScriptLibrary@1.5.1
#addin nuget:?package=TALXIS.DevKit.Build.Dataverse.ScriptLibrary&version=1.5.1
#tool nuget:?package=TALXIS.DevKit.Build.Dataverse.ScriptLibrary&version=1.5.1
TALXIS.DevKit.Build.Dataverse.ScriptLibrary
MSBuild integration for Dataverse web resource (JavaScript/TypeScript) projects. Automatically runs npm install and npm run build when a TypeScript project is detected, copies the compiled JS output to the build output directory, and exposes metadata targets that allow Solution projects to discover and integrate script libraries as web resources.
Installation
<PackageReference Include="TALXIS.DevKit.Build.Dataverse.ScriptLibrary" Version="0.0.0.1" PrivateAssets="All" />
Or use the SDK approach:
<Project Sdk="TALXIS.DevKit.Build.Sdk/0.0.0.1">
<PropertyGroup>
<ProjectType>ScriptLibrary</ProjectType>
</PropertyGroup>
</Project>
Prerequisites
When RunNodeBuild is true (auto-detected from the presence of package.json in TypeScriptDir):
- Node.js must be available on
PATH - npm must be available on
PATH
The build will fail with a descriptive error if either is missing.
How It Works
The package sets ProjectType to ScriptLibrary and disables GenerateAssemblyInfo by default since this is not a traditional .NET assembly project.
Build-time targets
- CheckScriptLibraryPrereqs -- validates that
TypeScriptDirexists,package.jsonis present, andnode/npmare onPATH. - BuildTypeScript (runs before
Build) -- executesnpm installfollowed bynpm run buildinTypeScriptDir. - CopyScriptLibraryMainToOutput (runs after
Build) -- copies the main JS file fromTypeScriptDir\build\to the output directory.
Integration targets
Called by TALXIS.DevKit.Build.Dataverse.Solution via ProjectReference:
- GetProjectType -- returns
ScriptLibrary. - GetScriptLibraryOutputs -- exposes the compiled JS file path for the solution to copy into
WebResources/. - GetSuppressedScriptLibraryReferences -- returns the absolute paths of
<ProjectReference>entries markedCompileOnly. Solution uses this to remove those projects from the standalone deployment list (so they don't land in the solution as their own web resources when the consumer only needs their types).
Cross-ScriptLibrary references
When one ScriptLibrary project references another, the relationship is controlled by the ScriptLibraryMode metadata on the <ProjectReference>:
<ItemGroup>
<ProjectReference Include="..\Shared\Shared.csproj">
<ScriptLibraryMode>CompileOnly</ScriptLibraryMode>
</ProjectReference>
</ItemGroup>
| Mode | Build-time effect | Runtime effect in Dataverse |
|---|---|---|
Separate (default) |
Both projects compile independently. | Each project is deployed as its own web resource. The consuming form must load both, with the referenced library first. |
CompileOnly |
The referenced project still builds (so its .d.ts is available for TypeScript-side /// <reference> resolution), but its .js is not deployed by this Solution. |
The referenced project is not deployed by this Solution. The consumer assumes the library is already loaded in Dataverse via some other deployment path. |
CompileOnly removes the referenced project from the Solution's standalone-deployment list automatically.
Separate is not handled as an explicit value in the targets — the build logic only checks for CompileOnly. Anything else (including the literal string Separate, an empty value, a typo like Compile, or omitting the metadata entirely) falls through as the default behaviour: both projects compile independently and both deploy as their own web resources. The Separate keyword in this table is documentation only — there is no validation that would reject unknown values.
MSBuild Properties
| Property | Default | Description |
|---|---|---|
ProjectType |
ScriptLibrary |
Marks the project for reference discovery by Solution projects. |
RunNodeBuild |
Auto-detected | Set to true to run npm install and npm run build. Defaults to true if package.json exists in TypeScriptDir. |
TypeScriptDir |
$(MSBuildProjectDirectory)\TS |
Folder containing the TypeScript project (package.json, sources). |
ScriptLibraryMainFile |
(none) | Main script file path used by consuming targets. |
<ProjectReference> metadata ScriptLibraryMode |
Separate |
Controls the relationship to another referenced ScriptLibrary project: Separate or CompileOnly. See Cross-ScriptLibrary references. |
LangVersion |
latest |
C# language version for the project. |
GenerateAssemblyInfo |
false |
Disables auto-generated assembly info. |
Related Packages
- Depends on:
TALXIS.DevKit.Build.Dataverse.Tasks - Consumed by:
TALXIS.DevKit.Build.Dataverse.Solutionprojects viaProjectReference
Learn more about Target Frameworks and .NET Standard.
-
- TALXIS.DevKit.Build.Dataverse.Tasks (>= 1.5.1)
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.5.1 | 97 | 5/26/2026 |
| 1.5.0 | 230 | 5/26/2026 |
| 1.4.0 | 312 | 5/14/2026 |
| 1.3.0 | 120 | 5/14/2026 |
| 1.2.2 | 239 | 5/4/2026 |
| 1.2.1 | 133 | 5/4/2026 |
| 1.2.0 | 134 | 5/4/2026 |
| 1.1.0 | 134 | 5/1/2026 |
| 1.0.0 | 145 | 4/29/2026 |
| 0.0.0.16 | 154 | 4/28/2026 |
| 0.0.0.15 | 156 | 4/26/2026 |
| 0.0.0.14 | 150 | 4/25/2026 |
| 0.0.0.13 | 302 | 3/13/2026 |
| 0.0.0.12 | 196 | 3/11/2026 |
| 0.0.0.11 | 212 | 3/6/2026 |
| 0.0.0.10 | 220 | 2/24/2026 |
| 0.0.0.9 | 261 | 2/12/2026 |
| 0.0.0.8 | 211 | 2/11/2026 |
| 0.0.0.7 | 215 | 2/11/2026 |
| 0.0.0.6 | 215 | 2/10/2026 |