views:

187

answers:

1

I have created a set of templates that I want to share across multiple projects. Is it possible to add the template to the Project “Add New Item” dialog such that when I choose it an instance of the code file is generated from the template and added to the project?

Update

Thanks for suggestions Preet. That answers the question but I think I have asked the wrong one. Thinking about it some more, I now want to be able automate the processing of T4 templates and pass parameters to them from user input.

I'm now looking at this from a new angle. Specifically attempting to use the Microsoft.VisualStudio.TextTemplating.Engine class and GAX to generate code files from templates myself.

A: 

Can't see why not - you just create an Item template. See here and here for more details

Preet Sangha