How I can create custom file template in VS2010? I mean when I add new item to project, i want to see MyCustomClass.cs that will contain name spaces and other things?
Thx
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Creating your own templates in Visual Studio is not hard.
There is lots of information on MSDN:
From that last link:
Create or open a project in Visual Studio.
Add an item to the project and modify it if you want to.
Modify the code file to indicate where parameter replacement should take place. For more information, see How to: Substitute Parameters in a Template.
On the File menu, click Export Template.
Click Item Template, select the project that contains the item, and click Next.
Select the item for which you want to create a template, and click Next.
Select the assembly references to include in the template, and click Next.
Type the icon file name, preview image, template name, and template description, and click Finish.
The files for the template are added to a .zip file and copied to the ..\Users\username\Documents\Visual Studio 2010\Templates\ItemTemplates\ folder.