I'm currently putting together a .vsix which contains various item and project templates using SideWaffle and TemplateBuilder v1.1.4.9-beta. When running the project in an experimental instance, I can see all of the project templates where they should be, but the item templates aren't available in the Add New Item dialog for any project types except Console Applications. The behaviour is the same if I compile the project to a release .vsix and install it for Visual Studio the traditional way.
Folder structure for one example template for reference:
The content of CSharp.vestemplate:
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<ProjectType>CSharp</ProjectType>
<DefaultName>my_layout.xml</DefaultName>
<Name>My Layout</Name>
<Description>My Description</Description>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<TemplateID>65197798-4682-45e6-9bf4-d2d9e2929527</TemplateID>
<SortOrder>1000</SortOrder>
</TemplateData>
<TemplateContent>
<References />
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.xml">my_layout.xml</ProjectItem>
</TemplateContent>
</VSTemplate>
I've already tried:
but all to no avail so far.
Despite Microsoft's documentation lacking any reference to them, the TemplateGroupId
types MonoAndroid
and Xamarin.iOS
are available, and must be specified within the template's .vstemplate
. Adding the following element to a TemplateData element gets the template to show up correctly:
<TemplateGroupID>MonoAndroid</TemplateGroupID>
It's fairly frustrating that the available TemplateIDs don't seem to be properly documented anywhere, and the ones that do work follow seemingly random naming conventions (one would expect MonoAndroid
and MonoTouch
, or Xamarin.Android
and Xamarin.iOS
, but instead only MonoAndroid
and Xamarin.iOS
actually work...).