Sunday, February 26, 2012

Publishing VSIX Project or Item Templates in a specified Category

If you are creating a VSIX Project and adding your individual Item or Project Templates to your VSIX Project, you probably have noticed that the default behavior of the VSIX Project is to simply publish the Item or Content Template at the root of the targeted language such as C#.

However, many Project Templates or Item Templates will be targeted towards specific categories or project types such as "Web", therefore, you will want to ensure that this categorical information displays when you install your VSIX Project as well.

Fortunately, the solution to achieving this is quite simple:

When you Add Content to your VSIX Project (such as your previously created Project or Item Template .zip file), there is a text field that states "Add to subfolder (optional)".  If you enter a directory path in this field such as /CSharp/Web, the appropriate folder structure will automatically be created for you as the content is added.




The result, as you can probably already guess, is that the installation of the VSIX project successfully publishes your Project or Item Template in the appropriate category!

No comments:

Post a Comment