Following from my other CrmSvcUtil extensions CrmSvcUtil Attribute Constant Generator Extension and CrmSvcUtil Option Set Enum Generator Extension, I’ve also implemented a (light-weight) extension to the standard entity generator.
Currently, the list of customisations that this extension adds is:
- Replaces the standard <summary> tag for all attributes with the new summary in the form: [ISNULL(Attribute.Label, Attribute.LogicalName)]: [Attribute.Description].
- Add a System.ComponentModel.Description attribute to each attribute showing the label of the attribute.
The purpose of these extensions is to give visiblity of the label of an attribute – specifically to make our lives easier when coding against attributes whose labels no longer match their logical name.
Download the CrmSvcUtil extension at codeplex: CrmSvcUtil Generate Entities.
To use the extension:
- Copy GenerateEntities.dll into the directory containing CrmSvcUtil.exe
- Run CrmSvcUtil with the following parameters:
CrmSvcUtil.exe ^ /codecustomization:"GenerateEntities.CodeCustomizationService, GenerateEntities" ^ /url:http://servername/orgname/XRMServices/2011/Organization.svc ^ /out:Attributes.cs ^