Skip to content

Releases: delegateas/XrmPluginCore

Core 1.4.1

Choose a tag to compare

@mkholt mkholt released this 01 Jul 06:51
3cf0580

What's Changed

  • Use SchemaName instead of LogicalName for privilege by @mkholt in #18

Full Changelog: v1.4.0/v1.1.0...v1.4.1/v1.1.0

Core 1.4.0

Choose a tag to compare

@mkholt mkholt released this 01 Jul 05:57
fe081b1

v1.4.0 - 30 June 2026

  • Add: WithExecutePrivilege<T>(Privilege) on the Custom API builder for type-safe execute-privilege configuration, e.g. .WithExecutePrivilege<Account>(Privilege.Read) resolves to prvReadaccount. A WithExecutePrivilege(string entityLogicalName, Privilege) overload is available for late-bound scenarios. The existing WithExecutePrivilegeName(string) remains for non-standard privilege names.
  • Add: Type-safe Custom API request/response wrappers. RegisterAPI<TService>(name, handlerMethodName) now generates {ApiName}Request/{ApiName}Response classes (named after the API, in the plugin's namespace) from the AddRequestParameter/AddResponseProperty declarations. The handler accepts the request and returns the response; a generated ActionWrapper marshals InputParameters into the request and the returned response into OutputParameters. When no request parameters are declared the handler takes no argument, and when no response properties are declared it returns void.
  • Add: Error XPC4004: Custom API handler method not found (with code fix to create the method).
  • Add: Warning XPC4005 / Error XPC4006: Custom API handler signature does not match the declared request parameters and response properties (with code fix to correct the signature).
  • Add: XPC3001 (Prefer nameof over string literal) now also covers the Custom API handler argument.
  • Add: Warning XPC3006: the typed RegisterAPI<TService>(name, handlerMethodName) overload requires a compile-time constant name (so the generated classes can be named after the API); a non-constant name is reported instead of silently skipping generation.
  • Add: The typed RegisterAPI<TService>(name, handlerMethodName) overload now throws ArgumentException when the name or handler method name is null or whitespace, so misconfigurations fail fast at registration instead of being silently treated as "no registration" at execution time.
  • Fix: Generated image properties now mirror the [Obsolete] attribute of the underlying entity property, so deprecation warnings (CS0612/CS0618) surface in the calling code instead of inside the auto-generated image class.
  • Fix: Generated code (images and Custom API request/response) now only emits nullable reference-type annotations (string?) and a #nullable enable directive when the consuming project has nullable reference types enabled. On projects without NRT (including .NET Framework / C# 7.3 defaults) the generated code is emitted without those annotations, keeping it compilable and warning-free. Nullable value types (int?) are always emitted.

What's Changed

  • Mirror [Obsolete] onto generated image properties by @mkholt in #15
  • Add type-safe Custom API request/response wrappers by @mkholt in #16
  • Add type-safe execute privilege helpers for Custom APIs by @mkholt in #17

Full Changelog: v1.3.0/v1.1.0...v1.4.0/v1.1.0

Core v1.3.0

Choose a tag to compare

@mkholt mkholt released this 22 Jun 07:56
977a2ad

v1.3.0 - 22 June 2026

  • Add: IPluginImage, IPluginImage<TEntity>, IPluginPreImage/IPluginPreImage<TEntity> and IPluginPostImage/IPluginPostImage<TEntity> interfaces for generated images. Handler methods can now accept these interface types so functionality can be shared across the per-registration concrete image types. The generic variants expose a type-safe Entity property.
  • Add: Generated images (and IPluginImage) now always expose the record's Id (primary key) and LogicalName, since they are available on every entity image.
  • Fix: Detect handler methods inherited from base interfaces
  • Fix: Always generate aliased usings
  • Breaking: Removed IEntityImageWrapper<T>; generated images now implement IPluginPreImage<TEntity>/IPluginPostImage<TEntity> instead. Replace any usage of IEntityImageWrapper<T> with IPluginImage<TEntity>.

What's Changed

  • Fix: detect handler methods inherited from base interfaces by @mkholt in #11
  • Always generate aliased usings by @mkholt in #12
  • Add shared image interfaces (IPluginImage/IPluginPreImage/IPluginPostImage) by @mkholt in #13

Full Changelog: v1.2.8/v1.1.0...v1.3.0/v1.1.0

Core v1.2.8

Choose a tag to compare

@mkholt mkholt released this 01 May 04:55
8244f8b

v1.2.8 - 30 April 2026

  • Fix: Set ServiceProvider property on LocalPluginContext
  • Fix: XPC3004: Detect and report usage of LocalPluginContext when implicitly passed

What's Changed

  • Fix localplugincontext serviceprovider by @mkholt in #10

Full Changelog: v1.2.7/v1.1.0...v1.2.8/v1.1.0

Core v1.2.7

Choose a tag to compare

@mkholt mkholt released this 22 Apr 19:13
2717ae6

v1.2.7 - 22 April 2026

Add: Ability to generate Pre and Post images with all attributes
Add: Error XPC3004: Do not use LocalPluginContext as TService in RegisterStep
Add: Warning XPC3005: Full entity image registration without specifying attributes

What's Changed

  • Combine changelogs for SourceGenerator and Main, they are always in sync anyway by @mkholt in #8
  • Add: XPC3004 error diagnostics, to avoid people using RegisterStep<Entity, LocalPluginContext> which fails at runtime. by @mkholt in #7
  • Add: Support fully-registered pre/post images by @mkholt in #9

Full Changelog: v1.2.6/v1.1.0...v1.2.7/v1.1.0

Core v1.2.6 / Abstractions v1.1.0

Choose a tag to compare

@mkholt mkholt released this 27 Feb 12:36
b4603c7

v1.2.6 - 27 February 2026

  • Add: Add using directives for generated image namespaces
  • Fix: Handle ambiguous PreImage/PostImage usings with aliases

Full Changelog: v1.2.5/v1.1.0...v1.2.6/v1.1.0

Core v1.2.5 / Abstractions v1.1.0

Choose a tag to compare

@mkholt mkholt released this 22 Jan 11:04
b1f354b

v1.2.5 - 22 January 2026

  • Fix: Avoid naming collisions on generated types when multiple plugins in the same assembly use Type-Safe Images
  • Fix: Generate PreImage/PostImage types, even when handler signature does not match
  • Fix: Refactored the image registration analyzer to always report XPC3002 for any AddImage usage, regardless of handler syntax (nameof, method reference, or lambda).
    XPC3003 is now only reported for lambda invocation with the modern API.

What's Changed

  • Refactor image registration analyzer and expand XPC3002 by @mkholt in #4
  • fix(SourceGenerator): resolve hint name collision and improve DX for new registrations by @mkholt in #5

Full Changelog: v1.2.4/v1.1.0...v1.2.5/v1.1.0

Core v1.2.4 / Abstractions v1.1.0

Choose a tag to compare

@mkholt mkholt released this 03 Dec 08:52
564c78e

v1.2.4 - 3 December 2025
ADD: Support for setting ExecutePrivilegeName
Fix: Image wrappers now forward to the underlying strongly-typed entity type instead of the base Entity type

Full Changelog: v1.2.3/v1.1.0...v1.2.4/v1.1.0

Core 1.2.3 / Abstractions 1.1.0

Choose a tag to compare

@mkholt mkholt released this 28 Nov 12:07
ea669f4

Fix: Generate PreImage/PostImage types even when handler signature doesn't match (fixes chicken-and-egg problem where types couldn't be used until they existed)
Breaking: Reorganized diagnostic IDs by category (XPC1xxx=Info, XPC2xxx=Plugin structure, XPC3xxx=Style, XPC4xxx=Handler methods, XPC5xxx=Internal errors)

Full Changelog: v1.2.2/v1.1.0...v1.2.3/v1.1.0

Core 1.2.2 / Abstractions 1.1.0

Choose a tag to compare

@mkholt mkholt released this 27 Nov 13:57
95019dd

v1.2.2 - 27 November 2025

  • Fix: XPC4003 has been reduced to Warning to allow initial build to succeed
  • Add: New rule XPC4006 (Error) to enforce handler signature correctness once generated types exist