Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Web Project
 

Web Project

Hi, i´m having problems adding a web project to my solution by using a template. I have the following code:
<VSTemplate
Version="2.0"
Type="ProjectGroup"
xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name>WebProj</Name>
<Description>WebProj</Description>
<ProjectType>CSharp</ProjectType>
<SortOrder>90</SortOrder>
<CreateNewFolder>false</CreateNewFolder>
<DefaultName>Crear una Nueva Solucion del Sitio</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<Icon>__TemplateIcon.ico</Icon>
</TemplateData>
<TemplateContent>
<ProjectCollection>
<SolutionFolder Name="BusinessLayer">
<ProjectTemplateLink ProjectName="$ProjectName$">Projects\Biblioteca\Biblioteca.vstemplate</ProjectTemplateLink>
</SolutionFolder>
<SolutionFolder Name="Data" />
<SolutionFolder Name="WebSites">
<ProjectTemplateLink ProjectName="$WebSiteName$">Projects\ProyectoWeb\WebUI.vstemplate</ProjectTemplateLink>
</SolutionFolder>
</ProjectCollection>
</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>
<WizardData>
<Template xmlns="http://schemas.microsoft.com/pag/gax-template" SchemaVersion="1.0" Recipe="CreateSolution">
<References>
</References>
</Template>
</WizardData>
</VSTemplate>

It creates 3 folders, the first one it creates the C# project but in the third one just creates an empty folder

The WebUI.vstemplate is

<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<TemplateData>
<Name>WebApplication1</Name>
<Description>&lt;No hay ninguna descripción disponible&gt;</Description>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>
</ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>WebApplication1</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon>__TemplateIcon.ico</Icon>
</TemplateData>
<TemplateContent>
<Project TargetFileName="$WebSiteName$.csproj" File="WebUI.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="Default.aspx">Default.aspx</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="Default.aspx.cs">Default.aspx.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="Default.aspx.designer.cs">Default.aspx.designer.cs</ProjectItem>
<Folder Name="Properties" TargetFolderName="Properties">
<ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
</Folder>
<ProjectItem ReplaceParameters="true" TargetFileName="Web.config">Web.config</ProjectItem>
</Project>
</TemplateContent>
</VSTemplate>


Please Help,

Thanks.
Mar77incho  Saturday, September 01, 2007 4:50 PM

Hi Mar77incho,

At first it looks like there isn't anything wrong with your .vstemplate. Please check it outside the context of GAX, i.e. do a simple "Export Template" and try to unfold that very same template and see if that works ok. That way, we can discard anything else going wrong with your VS.

thanks,

-Victor.

vga  Friday, September 07, 2007 5:26 AM
Hi, no errors? Is the WebUI.vstemplate file in the output folder under the Templates\Projects\ProyectoWeb directory?

Thanks,
-Adrian
Adrian Alonso  Monday, September 03, 2007 8:22 PM

Hi Mar77incho,

At first it looks like there isn't anything wrong with your .vstemplate. Please check it outside the context of GAX, i.e. do a simple "Export Template" and try to unfold that very same template and see if that works ok. That way, we can discard anything else going wrong with your VS.

thanks,

-Victor.

vga  Friday, September 07, 2007 5:26 AM

You can use google to search for other answers

Custom Search

More Threads

• t4 help
• Getting Started
• T4 and DotNet 3.5
• Is it possible to call an action from a Converter ?
• How to add template menu item to custom solution
• Error installing GAT on VS 2005 (German)
• Adding a solution to source control during CreateSolution Recipe
• GAT & BI products
• Project reference problem
• How to make item templates appear in "sub categories" in VS 2008