If you have read my previous post about item templates, you already know that there are two kinds of templates.
This is also applicable for a VS Shell isolated application, the only thing that changes is the location for Custom Templates and this is because you have you own AppId. (VS Shell application)
So if you want to deploy a Custom Template you need to place it under:
My Documents\Vs Shell Application Name\Templates\
This is also reflected by the following line on the pkgdef file:
"DefaultProjectsLocation"="$MyDocuments$\VSShellStub1"
Also, you need to perform different steps to have the templates displayed on your VS Shell application:
This is the rule:
- If you deploy a Installed template you need to perform Stub.exe /Setup
- If you deploy a Custom template you don't need to do anything, just execute the VS Shell application
Pablo
A solution item template is an VS item template that is available at the Solution level.
The list of item templates that you see on the Add New Item dialog is constructed by VS by looking for installed templates on certain locations.
There are two types of templates:
- Installed Templates
- Custom Templates
The location for the custom templates can be modified:
So lets see again the locations:
The problem is that for a solution item template we DON'T have a language, there is no project that act as a container because we want to add the item directly to the solution.
So how we can create and deploy a solution template? The answer is by using the General category:
And the same category for the ProjectType node in the vstemplate file:
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>Class1.cs</DefaultName>
<Name>MyClass</Name>
<Description>My Item Template</Description>
<ProjectType>General</ProjectType>
<SortOrder>10</SortOrder>
<Icon>MyClass.ico</Icon>
</TemplateData>
<TemplateContent>
<References />
<ProjectItem SubType="Code" TargetFileName="$fileinputname$.cs" ReplaceParameters="true">Class1.cs</ProjectItem>
</TemplateContent>
</VSTemplate>
Pablo
James has written an excellent article about the Visual Studio Shell Isolated. It basically covers the steps needed to create a VS Shell Isolated application and how to integrate a VSX Package with it. It also mention the VS Shell customizations points and the current authoring tools provided by the VS SDK August CTP. A must read article.
Pablo