D365Extensions 2.10.0
dotnet add package D365Extensions --version 2.10.0
NuGet\Install-Package D365Extensions -Version 2.10.0
<PackageReference Include="D365Extensions" Version="2.10.0" />
<PackageVersion Include="D365Extensions" Version="2.10.0" />
<PackageReference Include="D365Extensions" />
paket add D365Extensions --version 2.10.0
#r "nuget: D365Extensions, 2.10.0"
#:package D365Extensions@2.10.0
#addin nuget:?package=D365Extensions&version=2.10.0
#tool nuget:?package=D365Extensions&version=2.10.0
D365Extensions
A collection of Extension methods for Microsoft Dynamics CRM/D365 SDK base classes
Setup
All extension methods are declared in the same namespace as related SDK types. No additional using statements required.
Usage
This library is assumed to be used for plugin development. As D365 for CE currently doesn't support assembly dependencies, you have to merge it with your primary plugin assembly. We recommend using this tool:
ILRepack use the same technique as ILMerge but it is build on newer versions of Mono instruments so it is more fast and efficient. Please refer to link above for documentation.
To configure this task your should add ILRepack.targets file to you project. File contents should be looking like the following:
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AfterBuild" Condition="'$(BuildingForLiveUnitTesting)' != 'true'">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)\$(AssemblyName).dll" />
<InputAssemblies Include="$(OutputPath)\D365Extensions.dll" />
</ItemGroup>
<ILRepack Parallel="true"
DebugInfo="true"
InputAssemblies="@(InputAssemblies)"
LibraryPath="$(OutputPath)"
KeyFile="$(AssemblyOriginatorKeyFile)"
OutputFile="$(OutputPath)\$(AssemblyName).Merged.dll" />
</Target>
</Project>
By default assembly level attributes like [assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()] are not merged by ILRepack.
Consider using
CopyAttributes="true"argument if your Early Bound types are stored in separate assembly from plugins
Otherwise, it may lead to additional memory allocations when using ToEntity<T> method or even invalid class cast exceptions at runtime.
You should use KeyFile parameter as your plugin assembly should be signed. We also recommend use LibraryPath parameter as shown to avoid merge problems with dependent SDK assemblies.
!!! Never merge SDK assemblies in your code. It will cause runtime errors !!!
What's new
Semantic Versioning is used since v1.1.0. For version history please refer to CHANGELOG.md
Extensions
Entity Extensions
Set of extension methods for Microsoft.Xrm.Sdk.Entity base class. Simplifies dealing with Aliased and Formated values as well as working with Attributes collection.
IOrganizationService Extensions
Set of extension methods for IOrganizationService base class. Basically these are simple overrides of existing methods which take EntityReference or Entity instead of separate Id and LogicalName parameters.
IPluginExecutionContext Extensions
Set of extension methods for Microsoft.Xrm.Sdk.IPluginExecutionContext base class. Most of this helpers are shortcuts for existing properties but provides additional checks or type casts. Unlike Entity class extensions most of the following extensions are not exception safe! It is done so because you most likely want to get an error if plugin is registered for a wrong message or you have a typo in parameter name.
CodeActivityContext Extensions
Set of extension methods for System.Activities.CodeActivityContext base class. Shortcut methods for getting D365 related services from workflow execution context.
IServiceProvider Extensions
Set of extension methods for Microsoft.Xrm.Sdk.IServiceProvider base class. Just shortcut methods to save you few lines of code during plugin development.
EntityReference Extensions
Set of extension methods for Microsoft.Xrm.Sdk.EntityReference base class. At the moment just two simple but sometimes useful type conversion methods.
Query Extensions
Set of extension methods to support some expression-style/LINQ techniques while using QueryExpression/QueryByAttribute classes under the hood.
Contributing
Please fill free to create issue if you find a bug or have an idea. PR's are welcomed as well! 😃 Help wanted in the following areas:
- Unit tests. Most of extensions are just wrappers/overrides of SDK classes but as list of extension grows method call chain grows as well. It seems like it's a time to unit test all methods
- Code documentation. As it turns out, XML code documentation and wiki documentation are very different. Help with updating code doc is appreciated
| 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 was computed. 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 was computed. 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. |
| .NET Framework | net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.5.2
- Microsoft.CrmSdk.CoreAssemblies (>= 8.1.0)
- Microsoft.CrmSdk.Workflow (>= 8.1.0)
-
net8.0
- Microsoft.PowerPlatform.Dataverse.Client (>= 1.0.1)
- System.ServiceModel.Primitives (>= 4.10.3)
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 |
|---|---|---|
| 2.10.0 | 169 | 12/26/2025 |
| 2.9.0 | 356 | 12/8/2025 |
| 2.8.0 | 261 | 9/4/2025 |
| 2.7.1 | 234 | 6/16/2025 |
| 2.7.0 | 225 | 6/16/2025 |
| 2.6.0 | 172 | 6/14/2025 |
| 2.5.0 | 172 | 5/2/2025 |
| 2.3.0 | 9,539 | 12/28/2024 |
| 2.2.0 | 234 | 12/24/2024 |
| 2.1.0 | 537 | 5/30/2023 |
| 2.0.0 | 288 | 5/1/2023 |
| 1.5.3 | 1,733 | 12/2/2022 |
| 1.4.1 | 15,456 | 4/15/2022 |
| 1.4.0 | 657 | 2/7/2022 |
| 1.3.0 | 584 | 10/15/2021 |
| 1.2.1 | 1,147 | 8/19/2020 |
| 1.2.0 | 752 | 7/19/2020 |
| 1.1.0 | 14,293 | 8/30/2019 |
| 1.0.43 | 903 | 7/9/2019 |
| 1.0.42 | 894 | 6/28/2019 |
| 1.0.38 | 928 | 6/3/2019 |
| 1.0.37 | 870 | 5/27/2019 |
| 1.0.36 | 979 | 4/22/2019 |
| 1.0.35 | 877 | 4/15/2019 |
| 1.0.32 | 859 | 3/21/2019 |
| 1.0.31 | 870 | 3/11/2019 |
| 1.0.30 | 892 | 3/10/2019 |
| 1.0.28 | 985 | 2/4/2019 |
| 1.0.22 | 965 | 1/31/2019 |
| 1.0.21 | 1,005 | 12/19/2018 |
| 1.0.17 | 952 | 12/19/2018 |
| 1.0.16 | 1,123 | 10/5/2018 |
| 1.0.15 | 1,095 | 10/2/2018 |
| 1.0.8 | 1,078 | 10/1/2018 |
| 1.0.6 | 1,059 | 9/30/2018 |