Aylos.Xrm.Sdk.CrmSvcUtilExtensions
19.5.1622
dotnet add package Aylos.Xrm.Sdk.CrmSvcUtilExtensions --version 19.5.1622
NuGet\Install-Package Aylos.Xrm.Sdk.CrmSvcUtilExtensions -Version 19.5.1622
<PackageReference Include="Aylos.Xrm.Sdk.CrmSvcUtilExtensions" Version="19.5.1622" />
paket add Aylos.Xrm.Sdk.CrmSvcUtilExtensions --version 19.5.1622
#r "nuget: Aylos.Xrm.Sdk.CrmSvcUtilExtensions, 19.5.1622"
// Install Aylos.Xrm.Sdk.CrmSvcUtilExtensions as a Cake Addin #addin nuget:?package=Aylos.Xrm.Sdk.CrmSvcUtilExtensions&version=19.5.1622 // Install Aylos.Xrm.Sdk.CrmSvcUtilExtensions as a Cake Tool #tool nuget:?package=Aylos.Xrm.Sdk.CrmSvcUtilExtensions&version=19.5.1622
Extensions for the Microsoft Dynamics 365 CE and PowerApps CrmSvcUtil tool
Summary
This package contains extensions for the CrmSvcUtil code generation tool contained in the Microsoft Dynamics 365 CE and PowerApps tools. When you install the Nuget package the installation will require installation of the dependecy packages including of the CrmSvcUtil executable. You can use the tool to generate code for entities, attributes, option sets, etc. Before running the tool, adjust the configuration files according to your needs. Works well with both on-premise and online environments.
If you are not familiar with CrmSvcUtil read the below:
Generate early-bound classes for the Organization service
Create early bound entity classes with the code generation tool
How to use it
- Create a new .NET Framework class library project (preferably version 4.7.2).
- Install the Nuget package and accept installing the dependecy packages.
- Create a folder named "Domain" or choose another name of your preference under the project.
- Edit and adjust the two .config files according to your needs.
- Edit the entities.xml file with the entities to be included in the code generation.
- Edit and adjust the generate.bat file according to your needs and environment settings.
- Compile the project.
- Open a command prompt and navigate to the project output binaries folder (I usually find handy of changing the binaries output folder to a single bin folder for all the build configurations).
- Run the generate batch file, e.g. generate yourusername yourpassword [yourdomain]. You can also use the interactive login mode of CrmSvcUtil to connect/authenticate to your environment but you will need to add a reference to the Microsoft.Xrm.Tooling.Ui.Styles.dll in your project. The assembly can be found in the coretools folder.
Note: If you are generating separate files per type then you might be interested to edit the .csproj file manually to allow dynamic loading of all the .cs files in the Domain folder (e.g. <Compile Include="Domain\*.cs" />).
Release notes
Version - 19.5.1621
Changes:
- Rectified package issue with the .NET Framework 4.6.2 target
Version - 19.5.1421
Changes:
- Downgraded/targeting .NET Framework 4.6.2
Version - 19.5.120
Initial release contains the following features:
- Generates code for early bound entities
- Generates code for single-select option sets as enumerations fully integrated with the entity attributes
- Generates code for multi-select option sets as enumerations fully integrated with the entity attributes
- Supporting assembly compliance by using the Humanizer library and display names
- Reduces the size of the generated code by simplifying the namespaces on each type
- Option to generate all entities
- Option to generate separate files per type or a single file containing all types
- Option to generate either all or the referenced option sets by the generated entities only
- Option to generate setters for read-only attributes to help with mocking objects whilst implementing automated unit tests (should not be used in actual code)
- Option to define the suffix of primary key, status and status reason fields
- Option to define the prefix of the global option sets
- Option to define the maximum length of characters of entity, attribute or option set names
- Black list the entities that are to be excluded
- Black list the attributes that are to be excluded
- Define the entities to be generated
- Define the activity entities
- Does not generate entity relationships
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Humanizer.Core (>= 2.6.2)
- Microsoft.CrmSdk.CoreAssemblies (>= 9.0.2.12)
- Microsoft.CrmSdk.CoreTools (>= 9.0.2.12)
- Microsoft.IdentityModel (>= 6.1.7600.16394)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version - 19.5.1622
Changes:
- Rectified package issue with the .NET Framework 4.6.2 target
Version - 19.5.1421
Changes:
- Downgraded/targeting .NET Framework 4.6.2
Version - 19.5.120
Initial release contains the following features:
- Generates code for early bound entities
- Generates code for single-select option sets as enumerations fully integrated with the entity attributes
- Generates code for multi-select option sets as enumerations fully integrated with the entity attributes
- Supporting assembly compliance by using the Humanizer library and display names
- Reduces the size of the generated code by simplifying the namespaces on each type
- Option to generate all entities
- Option to generate separate files per type or a single file containing all types
- Option to generate either all or the referenced option sets by the generated entities only
- Option to generate setters for read-only attributes to help with mocking objects whilst implementing automated unit tests (should not be used in actual code)
- Option to define the suffix of primary key, status and status reason fields
- Option to define the prefix of the global option sets
- Option to define the maximum length of characters of entity, attribute or option set names
- Black list the entities that are to be excluded
- Black list the attributes that are to be excluded
- Define the entities to be generated
- Define the activity entities
- Does not generate entity relationships