support multiple project types in a custom item template

  • Thread starter Thread starter Stein TheRuler
  • Start date Start date
S

Stein TheRuler

Guest
I've created a custom item template. The ProjectType is CSharp and I can select it when I add a new item to a class library, but not ASP.NET Core projects.

All the documentation I found didn't cover if it's possible to support multiple project types.

MyTemplate.vstemplate:

<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>LC Class and Interface.cs</DefaultName>
<Name>LC Class and Interface</Name>
<Description>Default Class that derives from Interface</Description>
<ProjectType>CSharp</ProjectType>
<SortOrder>10</SortOrder>
<Icon>__TemplateIcon.png</Icon>
<PreviewImage>__PreviewImage.jpg</PreviewImage> </TemplateData>
<TemplateContent>
<References />
<ProjectItem SubType="CSharp" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">Class.cs</ProjectItem>
</TemplateContent>
</VSTemplate>



Senior .NET Developer

Continue reading...
 
Back
Top