Hello,
I implemented the extended UnfoldTemplateAction you wrote, but I continue to have problems.
In my case, the template I want to use is known, so I link to a physical location.
However, when I trie to run the guidance package, I get the following error:
Output window created.
(*) Error: 0 : Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe AddWebProject. Error was: Action AddWebProject failed to execute:
Invalid URI: The URI is empty..
You can remove the reference to this recipe through the Guidance Package Manager. ---> System.UriFormatException: Invalid URI: The URI is empty.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at Microsoft.VisualStudio.TemplateWizard.Wizard.Execute(Object application, Int32 hwndOwner, Object[]& ContextParams, Object[]& CustomParams, wizardResult& retval)
at EnvDTE.SolutionClass.AddFromTemplate(String FileName, String Destination, String ProjectName, Boolean Exclusive)
at Microsoft.Practices.RecipeFramework.Library.Templates.Actions.UnfoldTemplateAction.AddProjectTemplate(Project project)
at Microsoft.Practices.RecipeFramework.Library.Templates.Actions.UnfoldTemplateAction.Execute()
at SDWORX.SmartTools.SmartToolsGAT.Actions.AddWebProjectAction.Execute() in C:\TFSPROJECTS\bougrial\SmartTools\Common\SDWORX.SmartTools.SmartToolsGAT\SDWORX.SmartTools.SmartToolsGAT\Actions\AddWebProject.cs:line 77
at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName, Dictionary`2 inputValues)
at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName)
at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionCoordinationService.Run(Dictionary`2 declaredActions, XmlElement coordinationData)
at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
--- End of inner exception stack trace ---
at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)
at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(IAssetReference reference)
at Microsoft.Practices.RecipeFramework.RecipeReference.OnExecute()
at Microsoft.Practices.RecipeFramework.VisualStudio.VsBoundReference.OnExecute()
at Microsoft.Practices.RecipeFramework.AssetReference.Execute()
at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()
This is the recipe I use to trigger the action:
<
Recipe Name="AddWebProject" Recurrent="false">
<
Types>
<
xi:include href="TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(gax:Types/gax:TypeAlias)" />
<
TypeAlias Name="SolutionConverter" Type="Microsoft.Practices.RecipeFramework.Library.Converters.SolutionConverter, Microsoft.Practices.RecipeFramework.Library" />
</
Types>
<
Caption>Add a Web-User Interface project.</Caption>
<
HostData>
<
Icon ID="1046"/>
<
CommandBar Name="Solution"/>
</
HostData>
<
Actions>
<
Action Name="AddWebProject" Type="Prefix.GAT.Actions.AddWebProjectAction, Prefix.GAT">
</
Action>
</
Actions>
</
Recipe>
This is the vstemplate I use for the web-application:
<
VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
<
TemplateData>
<
Name>Prefix.CustomerName.CustomerProjectName.WebUI</Name>
<
Description>Web User Interf</Description>
<
ProjectType>Web</ProjectType>
<
ProjectSubType>CSharp</ProjectSubType>
<
SortOrder>1000</SortOrder>
<
CreateNewFolder>true</CreateNewFolder>
<
DefaultName>Prefix.CustomerName.CustomerProjectName.WebUI</DefaultName>
<
ProvideDefaultName>true</ProvideDefaultName>
<
LocationField>Enabled</LocationField>
<
EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<
Icon Package="{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}" ID="4547" />
</
TemplateData>
<
TemplateContent>
<
Project TargetFileName="WebUIProject.webproj" File="WebUIProject.webproj" ReplaceParameters="true">
<
Folder Name="App_Data" TargetFolderName="App_Data" />
<
Folder Name="UserControls" TargetFolderName="UserControls" />
<
Folder Name="Pages" TargetFolderName="Pages" />
<
Folder Name="images" TargetFolderName="images" />
<
Folder Name="css" TargetFolderName="css" />
<
Folder Name="scripts" TargetFolderName="scripts" />
<
ProjectItem ReplaceParameters="true" TargetFileName="Global.asax">Global.asax</ProjectItem>
<
ProjectItem ReplaceParameters="true" TargetFileName="Web.config">Web.config</ProjectItem>
</
Project>
</
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">
</
Template>
</
WizardData>
</
VSTemplate>
Could anyone tell me what I'm overseeing?
Thanks in advance
Nocto