Skip to content
asllanmakaj7 edited this page Oct 20, 2022 · 10 revisions

Introduction

Albanian Early Bound is a tool for XrmToolBox that generates Early-Bound Entities using a simple GUI to configure the desired output.

The tool uses CrmSvcUtil.exe included in the Microsoft.CrmSdk.CoreTools NuGet package.

Attention! CrmSvcUtil.exe is not included in this tool, you must first download it from NuGet (or any NuGet compatible source, even local folders if you don't have internet connectivity). To download the latest version of CrmSvcUtil.exe you can use the GetCoreTools command.

Configuration Options

The configuration options are exposed on the tool's left panel. This is an example as of version 1.2020.12.1: Albanian Early Bound Options

General

These configurations are global for the tool.

Configuration Description
Coupled Relationships Choosing one relationship also chooses the coupled relationship
Cache Metadata Use the cached metadata during the code generation
NuGet Feed The path of the NuGet feed to use for Microsoft.CrmSdk.CoreTools
Specific Version Specific version of Microsoft.CrmSdk.CoreTools

Organization Options

The organization options are saved per connection, this way you can have different configurations (ex. Different namespace) for different organizations.

Configuration Description
Namespace The generated code Namespace
Service Context The name of the service context (if left empty service context does not get generated)
Output Output path of the generated file
Language The output language CSharp or VB
Remove PropertyChanged If you don't want to use the ServiceContext, then the INotifyPropertyChanging and INotifyPropertyChange Events are only unnecessary overhead
Remove ProxyTypesAssembly Remove ProxyTypesAssemblyAttribute from generated code
Remove Prefix Remove Publisher prefix from Entities, Attributes and OptionSets
Xml Documentation Generate Xml documentation from metadata description
Xml Workaroud Apply a workaround to fix xml documentation escaping
Attribute Constants Generate attributes as Constants in the class Fields
Generate Enums Generate OptionSet enums
Generate TwoOptions Generate Enumerations or Constants for TwoOptions attributes
Enum Properties Generate Enum properties for OptionSet attributes

Version

This section shows the version of the dependencies

Configuration Description
CoreTools The Assembly version of CrmSvcUtil.exe
Recycable Memory Stream The Assembly version of Microsoft.IO.RecyclableMemoryStream
This Plugin The current version of the tool

Entities, Attributes and Relationships

One of the best features of Albanian Early Bound is the possibility to generate only the attributes or the relationships that you use in your code so that the Assembly size remains the smallest possible. when you use the Get Metadata command you get the list of all the entities on you organization.

There are three states for the tree nodes:

  • Unchecked - This node (Entity, attribute or relationship) will not be part of the generated code
  • Checked - This node (and all its sub nodes) will be part of the generated code
  • Partial (Black box) - This node will be part of the generated code but has sub nodes that will not be part of the generated code

The following image is an example selection (as of version v1.2020.12.1): Albanian Early Bound Entities

Every time a model is generated with the Generate command a file with the {output}.alb extension is created which contains the configuration of the desired output in a version control friendly format.

Right clicking on the tree there are helper commands as follows: Albanian Early Bound Commands

Where the select generated selects the tree nodes as per last model generation, this way you can do incremental changes to you model with ease.

Hidden feature

After you generate a model you can right click the Output Window and copy the command line used to generate it. (implemented in version v1.2021.1.1)