XrmDefinitelyTyped 7.0.0-preview.10

This is a prerelease version of XrmDefinitelyTyped.
dotnet tool install --global XrmDefinitelyTyped --version 7.0.0-preview.10
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local XrmDefinitelyTyped --version 7.0.0-preview.10
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=XrmDefinitelyTyped&version=7.0.0-preview.10&prerelease
                    
nuke :add-package XrmDefinitelyTyped --version 7.0.0-preview.10
                    

XrmDefinitelyTyped NuGet version npm version Join the chat at https://gitter.im/delegateas/XrmDefinitelyTyped

XrmDefinitelyTyped generates TypeScript declaration files based on your Dynamics 365/CRM/xRM solution.

It is the TypeScript equivalent of CrmSvcUtil, but instead of generating early-bound .NET classes for server-side code, it generates TypeScript interfaces for all your client-side coding.

Read more here

Repository layout

This repository ships two artifacts: the generator and the runtime library that consumes what it generates.

Path Artifact Registry
src/XrmDefinitelyTyped.Tool XrmDefinitelyTyped — dotnet tool, command xdt NuGet
src/XrmTyped.Shared Shared by both generators: Dataverse entity metadata, option sets, TypeScript emission plumbing, output writing —
src/XrmDefinitelyTyped.Core Form generation —
src/XrmQueryTyped.Core Web entity type generation for @delegateas/xrmquery —
src/XrmQuery @delegateas/xrmquery — type-safe Dataverse Web API query library npm

XrmQuery used to be emitted onto disk by the tool itself via -jsLib. It is now a normal npm package with ES module exports — see src/XrmQuery/MIGRATION.md for moving off the old web-resource setup.

Releasing

Both artifacts are released by pushing a tag; the version is taken from the tag name.

git tag tool-v3.0.0     && git push origin tool-v3.0.0        # -> NuGet
git tag xrmquery-v0.1.0 && git push origin xrmquery-v0.1.0    # -> npm

Installation

The generated declarations build on the community-maintained standard Xrm declarations and the modern XrmQuery package instead of shipping a private copy of the full client API surface:

npm install --save-dev @types/xrm
npm install @delegateas/xrmquery

When form generation is enabled, XDT emits _internal/XrmDefinitelyTyped.d.ts. This is a small, generator-owned augmentation layer over @types/xrm that carries the additional precision XDT can provide: lookup target unions, typed form collections, concrete quick-view forms, and typed option set controls. It does not redeclare the complete Xrm namespace.

Configuration

Usage

The tool runs two generators. Pick them with --generate (-g); the default is both.

xdt -o typings                      # forms and web entity types
xdt -o typings --generate forms     # form types only
xdt -o typings --generate web       # web entity types for @delegateas/xrmquery only

Web entity types land in typings/Web/<entity>.d.ts (or a single typings/Web/WebEntities.d.ts with --single-file) inside the XDT namespace, overridable with --web-namespace. Option-set numeric union declarations are written to typings/_internal/Enum/ by whichever generator needs them.

Named option-set values are emitted as modern as const runtime objects in typings/OptionSets.ts:

import { ctx_subscription_statuscode } from "./typings/OptionSets";

const status: ctx_subscription_statuscode = ctx_subscription_statuscode.Active;

Importing the object provides discoverable named values while its same-named type remains the exact union of the Dataverse numeric values. Unlike an ambient const enum, this works with isolatedModules and module-based transpilers. Because it is a runtime value, the generated module must be imported by application code that uses its members.

Shared entity interfaces

Use --intersect (-i) to name the common contract of existing entities:

xdt -o typings --intersect "ICustomer:account;contact, IActivity:phonecall;email;task"

ICustomer represents what accounts and contacts have in common. With both generators enabled, this produces shared form types such as Form.ICustomer.Main.Information from the common controls, attributes, tabs and sections of forms with matching names and form types on every member entity, plus XDT.ICustomer_Select, XDT.ICustomer_Filter, XDT.ICustomer_Result and the other shared Web API interfaces. The ordinary entity and form declarations are still generated.

Shared attribute metadata must have matching TypeScript and attribute types; incompatible fields are omitted. Read/create/update permissions are retained only when supported by every entity. A shared query contract has no entity set: query the actual accounts or contacts endpoint, not an invented ICustomer endpoint. Different primary ID fields are not part of the common contract.

Include the named entities in the metadata selection (--entities / --solutions) if you filter it. Missing entity metadata causes an error rather than silently using only some member entities. Unmatched forms and matched forms with no compatible common controls or tabs are omitted. An entity without forms does not prevent generation of its shared XrmQuery interfaces. Intersection mappings accept entity logical names, not form GUIDs.

Configuration Options

Features

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
7.0.0-preview.10 83 9/30/2026
7.0.0-preview.9 59 9/30/2026
7.0.0-preview.8 72 9/1/2026
7.0.0-preview.7 78 8/25/2026
7.0.0-preview.5 78 8/23/2026
7.0.0-preview.4 73 8/23/2026
7.0.0-preview.3 100 8/10/2026
7.0.0-preview.2 76 8/10/2026
7.0.0-preview.1 87 8/10/2026