VS2010: VSIX installation does not deploy element templates in it

This demo solution with two VSX projects: 1. Add a new project β†’ Extensibility β†’ Element template - "ItemTemplate1" 2. Add a new project β†’ Extensibility β†’ VSIX project - "VSIXProject1"

I have not made changes to "ItemTemplate1", so it creates a default item template (ItemTemplate1.vstemplate):

<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005"> <TemplateData> <Name>ItemTemplate1</Name> <Description>&lt;No description available&gt;</Description> <Icon>ItemTemplate1.ico</Icon> <TemplateID>e298765c-97b8-4f4c-9b7b-a6b368f914df</TemplateID> <ProjectType>CSharp</ProjectType> <RequiredFrameworkVersion>2.0</RequiredFrameworkVersion> <NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp> <DefaultName>Class.cs</DefaultName> </TemplateData> <TemplateContent> <References> <Reference> <Assembly>System</Assembly> </Reference> </References> <ProjectItem ReplaceParameters="true">Class.cs</ProjectItem> </TemplateContent> </VSTemplate> 

In VSIXProject1, I just edited source.extension.vsixmanifest, adding a link to the ItemTemplates1 project. After this, vsixmanifest contains only one description of the content:

 <Content> <ItemTemplate>ItemTemplates</ItemTemplate> </Content> 

Then built. In bin / debug I got VSIXProject1.vsix, inside which I can see my element template in the file ItemTemplates \ CSharp \ 1033 \ ItemTemplate1.zip.

Everything looks great!

Also, that does not work. I run VSIXProject1.vsix, vsix is ​​installed (I see it in the extension manager) , but no templates were copied to "C: \ Users \ {UserName} \ Documents \ Visual Studio 2010 \ Templates \ ItemTemplates"!

+1
visual-studio-2010 vsix vsx visual-studio-sdk
source share
2 answers

Templates installed through VSIX are not installed in the Templates folder in the User Documents folder. They are installed in% LocalAppData% \ Microsoft \ VisualStudio \ 10.0 \ Extensions \ <YourExtensionFolder> with all other content for this extension. (Installing VSIX basically just unpacks VSIX into a folder.)

You can still see the template when you try to add a new element to a C # project.

+5
source share
+1
source share

All Articles