The Code Generation tool is an external tool used for generating the required classes, and ORM mappings that are necessary to build the solution. Code generation is required when working on the solution, for the core objects, profiles and extensions. This article describes how code generation is built into initdev command for local development and how it can be executed from a CICD pipeline. 

Required Dependency

The code generation tool requires Microsoft's open source framework .NET Core version 2.2.4.

Running initdev

The code generation application is installed and the is executed within the implementation folder under tools when initdev is executed. The PowerShell script installs the application from MyGet into the the tools folder using the .NET framework after the empty database is created.

Manual Execution

The code generation utility can be run from the command line.

Installation

To Install the code generation tool manually, run the PowerShell command Install-CodeGen-Utiltity. This will pull the current version of the tool, and install it into the tools folder under the implementation repository.

Execution

To run code generation independently from the build process, the tool can be executed by calling the PowerShell command Run-CodeGen. This will execute the generation process for all required classes.





  • No labels