Friday, 6 September 2013

How can I selectively apply a VSTemplate?

How can I selectively apply a VSTemplate?

I am creating a custom VSTemplate for MVC 4 applications for my company
that uses a wizard that is comparable to the wizard that appears when you
create a new MVC4 application. I have one of two templates I would like to
apply when the developer creates a new app of this type as shown here:

Both of those entries correspond to templates that are defined inside my
VSIX project under a folder called ProjectTemplates:

My question is, how do I apply the correct template when the wizard runs?
I know how to create a vstemplate with multiple projects (using the
ProjectCollection node in the vstemplate), but that's not really what I
want to do since they will never be deployed together. I see that I can
add both vstemplates as Assets to my vsixmanifest file, but I'm not really
sure how to apply just one template conditionally.
Thanks!

No comments:

Post a Comment