Microsoft.Xrm.Sdk (the package)

Overview

The official Microsoft NuGet package providing the Organization Service SDK for Dynamics 365 / CRM. CRMAPIGenerator depends on the 9.x line matching Dynamics 365 CE on-prem v9.1 (the kalamos target customer surface).

Pinned version

Microsoft.Xrm.Sdk 9.x. Specific patch version is held in Directory.Packages.props (centrally managed). Do not bump without verifying the rest of the transitive graph — see [[NuGet-v3-vs-v6-Resolution]].

Transitive footprint (the source of most build pain)

Pulls in:

  • System.IdentityModel.Tokens.Jwt
  • Microsoft.IdentityModel.Tokens
  • System.ServiceModel.Primitives
  • Microsoft.Rest.ClientRuntime
  • Microsoft.IdentityModel.JsonWebTokens

Several of these have version conflicts with what Newtonsoft.Json (also a CRMAPIGenerator direct dep) drags in. Result: fragile build under NuGet v3 resolution; reliable under v6+. See [[NuGet-v3-vs-v6-Resolution]].

API surface used by CRMAPIGenerator

  • IOrganizationService — primary service interface; the wrapper classes implement against this contract
  • EntityMetadata, AttributeMetadata — schema introspection used to drive generation
  • OrganizationRequest / OrganizationResponse — request/response types for executable operations
  • RetrieveAllEntitiesRequest, RetrieveEntityRequest — schema discovery

Compatibility note

Microsoft.Xrm.Sdk 9.x targets .NET Framework. There is no .NET 6+ / .NET 8 equivalent for on-prem D365; agents must not propose migrating CRMAPIGenerator off Framework 4.6.2 without explicit human direction. The cloud SDK (Microsoft.PowerPlatform.Dataverse.Client) is a different package and incompatible with on-prem auth flows.

  • [[CRMAPIGenerator-Repository]] — primary consumer
  • [[NuGet-v3-vs-v6-Resolution]] — primary build pain source