Pablo Galiano : Thursday, October 04, 2007 - Posts

Subscriptions

<September 2010>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

News

Subscribe to Pablo Galiano by Email

Post Categories

Thursday, October 04, 2007 - Posts

Deploying VS templates for a VS Shell Isolated application

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

posted Thursday, October 04, 2007 9:47 PM by pga with 7786 Comments

Creating and deploying solution item templates

A solution item template is an VS item template that is available at the Solution level.

scn1

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
    • <VisualStudioInstallDir>\Common7\IDE\ItemTemplates\Language\Locale\

  • Custom Templates 
    • My Documents\Visual Studio 2005\Templates\ItemTemplates\Language\

scn5

The location for the custom templates can be modified:

scn4

So lets see again the locations:

  • <VisualStudioInstallDir>\Common7\IDE\ItemTemplates\Language\Locale\

  • My Documents\Visual Studio 2005\Templates\ItemTemplates\Language\

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:

  • <VisualStudioInstallDir>\Common7\IDE\ItemTemplates\General\Locale\

  • My Documents\Visual Studio 2005\Templates\ItemTemplates\General\

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

posted Thursday, October 04, 2007 9:19 PM by pga with 6 Comments

Introduction to Visual Studio Shell Isolated

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

posted Thursday, October 04, 2007 8:40 PM by pga with 0 Comments

VSX Community Letter for October 2007

Ken just published it.

 

Pablo

posted Thursday, October 04, 2007 7:13 AM by pga with 0 Comments