Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top