I’ve created a VS template using VS 2026, but no matter what I do, it doesn’t appear in the Add New Item menu.
I used the Export Template feature. It stated that it couldn’t export, but the export file was generated nonetheless.
Files:
Assets Db Entity.zip:
-AssetsDbEntity.cs
-MyTemplate.vstemplate
-_PreviewImage.png
-_TemplateIcon.ico
AssetsDbEntity.cs:
/*
@Date : 01.01.$year$
@Author : Stein Lundbeck
@Description : null
@Version : 1.0.0.1
@Latest : 01.01.$year$
*/
using SLT.Assets;
namespace $defaultnamespace$;
public interface I$safeitemname$ : IAssetsDb
{
}
public class $safeitemname$ : AssetsDb, I$safeitemname$
{
}
MyTemplate.vstemplate:
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>AssetsDb.cs</DefaultName>
<Name>Assets Db Entity</Name>
<Description>Create an entitty implementing IAssetsDb</Description>
<ProjectType>csharp</ProjectType>
<SortOrder>10</SortOrder>
<Icon>__TemplateIcon.ico</Icon>
<PreviewImage>__PreviewImage.png</PreviewImage>
</TemplateData>
<TemplateContent>
<References />
<ProjectItem SubType="" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">AssetsDbEntity.cs</ProjectItem>
</TemplateContent>
</VSTemplate>