How do I create my own Scaffold Template in ASP.NET MVC 3?

ASP.NET MVC uses T4 templates. Here’s an overview.

Here are the steps:

  1. In the Package Manager Console type: install-package mvc3codetemplatescsharp
  2. Accept all the warnings
  3. The CodeTemplates folder will be added to your project containing the templates

From here you could either modify the existing templates or add new one.

Or if you want to modify those globally you could to this in the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 3\CodeTemplates\ folder.

Leave a Comment