Visual Studio custom template class --- detailed steps

1. define a class file, the information is written to define the class file

Every time I write a command such as this are routine, to inherit interfaces, write the corresponding characteristics, each time repeating work:

2. Extract the class template

Project = "Export Templates
Here you can export project templates and item templates, here we select the item templates, project select the project you just write a template class is located, then the next step:
Select the template class, the next step:
Select the dependent dll, the next step:
Fill in the appropriate information, pay attention to check the "automatic import templates into Visual Studio", and then complete!
So that we can find the project board just exported under the project template directory:

3. Modify the relevant information

Export Now information is written to the death, such as class information I add, that how it becomes dynamic:
3.1 unzip the folder to export
There are three folders ico file are displayed inside the item template, template classes and template class configuration
 
We open the file cs 3.2
Change the information, save it.
3.3 recompression replace the original file compression
3.4 restart visual studio

4. Complete Test

Click the project, right to add items,

 

Guess you like

Origin www.cnblogs.com/smiler/p/11081862.html