NET Code Generator
Generating Single Files
Basic Tasks > Creating New Templates > Generating Single Files

If  you are generating a project file or a list of entities or classes, use the BaseSingleFileExample.tt template.

 

Steps

  1. Open the CodeGenTemplates.sln file
  2. Create a new Folder for the template under Languages
  3. Create a new T4 template in the newly created folder
  4. Copy and paste the contents of the Example\BaseSingleFileExample\BaseSingleFileExample.tt into the newly created template.
  5. Make the desired changes to your template