How to generate source code

To generate source code, you first have to make sure your project is valid. To do this, use the Project Validation functionality. The designer will also, prior to generating code, validate the project.

To start the code generation process, press F7 or select Project -> Generate source-code from the main menu. This will open the Code Generation Task Viewer dialog which offers the available code generation tasks to perform. There you can enable/disable the different code generation task and configure them independently. E.g. you can disable the task to generate code for a derived model but enable the task to generate code for the entity model.

To start the enabled code generation tasks, click the Perform Tasks button. After the code generation process has been completed successfully, the designer will automatically save the project. LLBLGen Pro doesn't overwrite existing VS.NET project files; it updates it with changes in the generated file references.

Automatic code generation

The LLBLGen Pro designer can generate sourcecode automatically when you save your project, in the background. To enable this, go to the Project Settings and check the setting 'Automatically generate source code on project save'. This feature works the same as if you're manually generating code, it executes the same tasks. See Automatic Code Generation for more information.

Generating code from the command line

LLBLGen Pro also ships with a command line code generator tool, cligenerator.exe. This tool is available in the LLBLGen Pro installation folder. The LLBLGen Pro sourcecode archive contains the sourcecode of this application which allows modification to the process.

Specifying ad-hoc templates

Sometimes you want to generate some additional files besides the usual code generated by a preset. To do so, you specify an .adhoctemplates file with the code generation task. See Executing an ad-hoc template for details.