yahia galal

yahia galal

  • NA
  • 29
  • 1.8k

T4 Template in MVC In Visual Studio 2017

Jan 29 2018 5:02 AM
The Add Controller and Add View dialogs both perform code generation that use T4 templates behind the scenes.
 
These templates can be modified to customize the generated code from these tools. You can find the templates at the following location:
 
[Visual Studio Install Directory]\Common7\IDE\ItemTemplates[CSharp | VisualBasic]\Web\MVC\CodeTemplates\
 
Now I will add my own T4 template to an existing list of templates. Copy list.tt and paste it. Then i rename the new template to MyList.tt
 
then I go to my Controller And Add view And Check Drop-Down Of templates I Can't Find My New template ?