Gugi.PP.Tools.XrmRequestBuilder
0.0.7
dotnet tool install --global Gugi.PP.Tools.XrmRequestBuilder --version 0.0.7
dotnet new tool-manifest
dotnet tool install --local Gugi.PP.Tools.XrmRequestBuilder --version 0.0.7
#tool dotnet:?package=Gugi.PP.Tools.XrmRequestBuilder&version=0.0.7
nuke :add-package Gugi.PP.Tools.XrmRequestBuilder --version 0.0.7
Gugi.PP.Tools.XrmRequestBuilder
A .NET CLI tool that generates strongly typed (early-bound) Typescript classes for Custom Actions and Custom APIs in Microsoft Dataverse. These classes integrate seamlessly with Xrm.WebApi, enabling type-safe code and reducing runtime errors.
⚠️ This tool is provided as-is. I will attempt to fix critical bugs and support new .NET versions, but I do not accept contributions and there will be no active development or new features.
Features
- Generates strongly typed classes for Custom Actions and Custom APIs.
- Early-bound types provide compile-time safety with
Xrm.WebApi. - Supports
.NET 8.0,.NET 9.0, and.NET 10.0. - Reduces runtime errors and simplifies code generation.
Installation
Install globally with the .NET CLI:
dotnet tool install --global Gugi.PP.Tools.XrmRequestBuilder --version 0.0.5
Update an existing installation:
dotnet tool update --global Gugi.PP.Tools.XrmRequestBuilder
Usage
The primary command is build, which generates code models for Dataverse APIs.
gugi.xrmrequestbuilder build [options]
Required Options
| Option | Short | Description |
|---|---|---|
--serviceUri |
-su |
URL of the Dataverse instance to connect to |
--outdirectory |
-o |
Directory where message files will be written |
--messagenamesfilter |
-mnf |
Semicolon-separated list of messages to include. Use a trailing or leading asterisk (*) with the names of the messages to allow for all messages starting with or ending with a string. |
Optional Authentication Options
| Option | Short | Description |
|---|---|---|
--useCurrentUserForLogin |
-ucufl |
Windows only. Uses the current Windows user for authentication |
--userName |
-un |
Username for interactive login |
--clientId |
-ci |
Client/Application ID for OAuth login |
--clientSecret |
-cs |
Client Secret for OAuth login |
⚠️ Exactly one authentication method must be used: either
--useCurrentUserForLogin,--userName, or--clientId+--clientSecret.
Example
Generate early-bound classes using the current Windows user:
gugi.xrmrequestbuilder build --serviceUri "https://yourorg.crm.dynamics.com" --useCurrentUserForLogin true --outdirectory "./GeneratedTypes" --messagenamesfilter "MyCustomAction*;OtherAction"
Generate using OAuth client credentials:
gugi.xrmrequestbuilder build --serviceUri "https://yourorg.crm.dynamics.com" --clientId "00000000-0000-0000-0000-000000000000" --clientSecret "YOUR_SECRET" --outdirectory "./GeneratedTypes" --messagenamesfilter "Create;Update*"
Requirements
- .NET 8.0+ SDK
- Access to a Dataverse environment with Custom Actions or Custom APIs
License
This project is licensed under the MIT License – see the LICENSE file for details.
Tags
dotnet-tool dataverse xrm xrm-webapi early-bound custom-actions custom-apis crm power-platform code-generation strongly-typed
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|