Hi,
You can use the below methods to add items to the solution or project from template.
If you need to add project to the solution using templates:
http://msdn.microsoft.com/en-us/library/ms228767.aspx
that is, you need to use the methods: GetProjectTemplate() and AddFromTemplate()
If you need to add project items from templete you can use this technique:
http://msdn.microsoft.com/en-us/library/ms228774.aspx
that is, you need to use the methods: GetProjectItemTemplate() and AddFromTemplate()
Additional link, How to: Migrate Code that Creates Projects by Using Templates:
http://msdn.microsoft.com/en-us/library/ms228762.aspx
Of corse, you need to use this from your Actions class, and invoke it from your recipe.
In DSL tool you can use directly the .zip with the template content:
http://msdn.microsoft.com/en-us/library/bb126425.aspx
In this case you can add the lines:
<vsProjectTemplates>
<vsProjectTemplate localeId="1033" targetDirectories="CSharp" templatePath="Files\WizardUIP.zip" />
</vsProjectTemplates>
I add it in the setup project in the install definition file (.dslsetup), but in this case is used because dsl doesn´t have the actions and recipies and the dynamism that has GAX.
In GAX you have the .vstemplate files to create template and you can use the it with the action "UnfoldTemplateAction", it is in GAX Extensions Library.
In this example: http://hortha.spaces.live.com/blog/cns!EEFCF44280C54412!123.entry?wa=wsignin1.0&sa=559252894
you can see how to use the UnfoldTemplateAction, with the .vstemplate
<Action Name="UnfoldDataLayerProjectTemplate"
Type="UnfoldTemplateAction"
Template="Solutions\Projects\DataLayer\DataLayer.vstemplate">
<Input Name="Root" RecipeArgument="SolutionArgument" />
<Input Name="DestinationFolder" RecipeArgument="DataLayerProjectFolder" />
<Input Name="ItemName" RecipeArgument="DataLayerProjectName" />
<Output Name="NewItem" />
</Action>Another link: http://social.msdn.microsoft.com/forums/en-US/vsgatk/thread/5e2059a0-9dd5-4647-a713-2e85b8669e57
If you export a template and open the .zip file, you can see inside the .vstemplate file and additional files necessary to create the template.
http://msdn.microsoft.com/en-us/library/ms185291(VS.80).aspx
You can disassemble the zip and add it into your GAX project, and then use the UnfoldTemplateAction to load it
In resume, in DSL solution you can use the zip directly (in the deploy operation) because you don´t have the potencial that you have in GAX, In GAX you have the UnfoldTemplateAction actions (or custom actions) and DTEEnv API.
I hope I have been helpful
greetings
Leandro Tuttini