Skip to content

Home

T4 FileManager

T4.FileManager.VisualStudio

Build Status Nuget

With the T4.FileManager you can define into which files T4 generates your code. You are no longer bound to the default behaviour of T4 that generates all the code of the “example.tt” template into a single “example.cs” file. Now you can split your code into the files you want:

  • Putting each generated data class into a single code file
  • Creating a server and a client component based on a common model
  • Distribute generated code to multiple projects within a solution
  • Set the file properties (like ResXFileCodeGenerator as CustomTool)
  • Update previously generated files

Features

Feature Description
Code Generation Put each generated class into a separate file.
File Header Create a custom header in your generated files.
Support for subfolders Generate files inside subfolders.
Support for projects Generate files in different projects of your solution.
File Properties Specify file properties like CustomTool or BuildAction.
Overwrite Existing File Overwrite previously generated files.
Shortcut support (Edit.FormatDocument) Cleanup the generated files to your coding standards.
Disable main output file Tell T4.FileManager not to create a main output file.
Logging Debug problems in your templates with the verbose log of T4.FileManager.

Table of contents

  1. Installation
  2. Quick start
  3. Create instance
  4. Start or create file
  5. Add header to files
  6. Proceed to generate files
  7. Auto indent and clean-up
  8. Generated file infos as JSON
  9. Logging and main output file
  10. Living documentation and testing
  11. Change log