Extending the Scaffolder Templates

The AB Suite MVC Scaffolder is installed as a VSIX extension for Visual Studio. The MVC Scaffolder is generally located in

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\<Generated Folder Name>

The <Generated Folder Name> is created when you install Microsoft Visual Studio. This folder is typically a random combination of letters and numbers. For example,

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\2dv0c1zj.bd0

This folder contains the ScaffolderCodeGenerator folder in the Templates folder. The ScaffolderCodeGenerator folder contains the .t4 template files that the Scaffolder uses to generate the files in the MVC project.

The following image shows the .t4 template files in the ScaffolderCodeGenerator folder:

If you want to customize any of the files that are generated, you can simply update the corresponding .t4 template file and save it in this location. When the Scaffolder runs, it uses the updated template and generates the custom output.

For example,

Notes:

  • Administrator access is required to update and save these templates.

  • Take a backup of the original template, in case you need to revert to it.