Aylos.Xrm.Sdk.CrmSvcUtilExtensions
19.5.120
See the version list below for details.
dotnet add package Aylos.Xrm.Sdk.CrmSvcUtilExtensions --version 19.5.120
NuGet\Install-Package Aylos.Xrm.Sdk.CrmSvcUtilExtensions -Version 19.5.120
<PackageReference Include="Aylos.Xrm.Sdk.CrmSvcUtilExtensions" Version="19.5.120" />
paket add Aylos.Xrm.Sdk.CrmSvcUtilExtensions --version 19.5.120
#r "nuget: Aylos.Xrm.Sdk.CrmSvcUtilExtensions, 19.5.120"
// Install Aylos.Xrm.Sdk.CrmSvcUtilExtensions as a Cake Addin #addin nuget:?package=Aylos.Xrm.Sdk.CrmSvcUtilExtensions&version=19.5.120 // Install Aylos.Xrm.Sdk.CrmSvcUtilExtensions as a Cake Tool #tool nuget:?package=Aylos.Xrm.Sdk.CrmSvcUtilExtensions&version=19.5.120
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.120
Initial release contains the following features:
- Generates code for early bound entities
- Generates code for 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 | net472 is compatible. 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.120
Initial release contains the following features:
- Generates code for early bound entities
- Generates code for 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