Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Can't see item templates for WebApplication projects
 

Can't see item templates for WebApplication projects

Hi,

I made item templates that should be available to WebApplication projects. Theses templates show upin the Project->Add menu, but when I select one template, I don't see anything in the Add New Item window. Not even my package name in the left panel...

But the vstemplate seems good because I can add the template in any other project type (class library or Winform application).

Here is the .vstemplate I Used (it's the .vstemplate of the standard webform that comes with VS2005) :

<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<Name Package="{39c9c826-8ef8-4079-8c95-428f5b1c323f}" ID="3062"/>
<Description Package="{39c9c826-8ef8-4079-8c95-428f5b1c323f}" ID="3063"/>
<Icon Package="{39c9c826-8ef8-4079-8c95-428f5b1c323f}" ID="4533"/>
<TemplateID>WebFormTest</TemplateID>
<TemplateGroupID>Web</TemplateGroupID>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>Web</ProjectSubType>
<ShowByDefault>false</ShowByDefault>
<SortOrder>1</SortOrder>
<DefaultName>WebFormTest.aspx</DefaultName>
</TemplateData>
<TemplateContent>
<References>
<Reference>
<Assembly>System.Web</Assembly>
</Reference>
<Reference>
<Assembly>System</Assembly>
</Reference>
<Reference>
<Assembly>System.Data</Assembly>
</Reference>
<Reference>
<Assembly>System.Drawing</Assembly>
</Reference>
<Reference>
<Assembly>System.Xml</Assembly>
</Reference>
</References>
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.$fileinputextension$">Default.aspx</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.$fileinputextension$.cs" SubType="ASPXCodeBehind">Default.aspx.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.$fileinputextension$.designer.cs">Default.aspx.designer.cs</ProjectItem>
</TemplateContent>
<WizardExtension>
<Assembly>Microsoft.Practices.RecipeFramework.VisualStudio, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<FullClassName>Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate</FullClassName>
</WizardExtension>
</VSTemplate>

Anyone ever encountered this problem?

Thanks.

Philippe

Philippe Trottier  Thursday, March 20, 2008 2:01 PM

Hi Philippe,

How are you adding the template reference? It's a unbound template referece or a bound?
If it's a unbound can you post how your IsEnabledFor looks?

thanks.

jose.

Jose Escrich  Tuesday, March 25, 2008 2:52 PM

Hi Jose,

it's an unbound template reference that I put in the actions of the "BindingRecipe" recipe.

Here is the action :

<Action Name="CreateUnboundWebFormTestTemplateRef" Type="RefCreator" AssetName="Items\WebFormTest\WebFormTest.vstemplate"
ReferenceType="FrameworkGuidancePackage.References.AnyElementTemplateReference, FrameworkGuidancePackage" />

The ReferenceType I used is a type I made that inherit from UnboundtemplateReference that only return true :

public override bool IsEnabledFor(object target)
{
return true;
}

Hope this helps!

Thank you!

Phil

Philippe Trottier  Wednesday, March 26, 2008 12:48 PM

In fact, I see the templates in the menu, but when I select one, it doesn't appears on the add new item dialog. The section for my guidance package that I usually see on the left panel of the Add new item window, is not present at all....

Please help!!

Phil.

Philippe Trottier  Monday, April 07, 2008 2:41 PM

You can use google to search for other answers

Custom Search

More Threads

• Resource1.Designer.cs not craeted correctly?
• Installation: Error 1001
• cross-recipe arguments
• Processing T4 in different languages
• Null reference Exception after upgrade to GAX 1.2
• Could MS provides its own T4 editor for GAT or DSL?
• PropertyProcessor problem
• Help me decide: how to generate my Data Access Layer ( please :)
• How to add multiple projects to an existing solution using GAT/GAX?
• Wizard data not replacing arguments correctly?