Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Actions don't get executed
 

Actions don't get executed

Hello everyone,

I have the following Actions declared:

<Actions>

<Action Name="AddProjectReferences" Type="MyNamespace.Actions.AddProjectReferencesAction, MyNamespace">

<Input Name="CustomerName" RecipeArgument="CustomerName" />

<Input Name="CustomerProjectName" RecipeArgument="CustomerProjectName" />

</Action>

<Action Name="RenameSolution" Type="MyNamespace.Actions.RenameSolutionAction, MyNamespace">

<Input Name="NewSolutionName" RecipeArgument="FinalSolutionName" />

</Action>

</Actions>

When I register my guidance package, and try it out, I can find my actions in the Guidance Package Manager, but they are just not executed. No references are made and my solution is not renamed (and it's code that has been used in other projects and does work).

Does anyone know why this could occur?

Thanks in advance,

Nocto

Nocto  Wednesday, December 19, 2007 12:37 PM
Hi,

You need to place those actions into a <Recipe> element then if you want to execute it when the solution is unfolded you also have to specify it into the solution .vstemplate as follow...

<WizardData>
<Template xmlns="http://schemas.microsoft.com/pag/gax-template"
SchemaVersion="1.0"
Recipe="YourRecipeName"/>
</WizardData>

If you still have troubles, please post all your recipe definition and where/when you want to execute it.

hth
jose.
Jose Escrich  Wednesday, December 19, 2007 2:28 PM
Hi,

You need to place those actions into a <Recipe> element then if you want to execute it when the solution is unfolded you also have to specify it into the solution .vstemplate as follow...

<WizardData>
<Template xmlns="http://schemas.microsoft.com/pag/gax-template"
SchemaVersion="1.0"
Recipe="YourRecipeName"/>
</WizardData>

If you still have troubles, please post all your recipe definition and where/when you want to execute it.

hth
jose.
Jose Escrich  Wednesday, December 19, 2007 2:28 PM

<Recipe Name="CreateProjects">

<Types>

<TypeAlias Name="RefCreator" Type="Microsoft.Practices.RecipeFramework.Library.Actions.CreateUnboundReferenceAction, Microsoft.Practices.RecipeFramework.Library"/>

</Types>

<Caption>Creates a new basic project.</Caption>

<Arguments>

<Argument Name="CustomerName" Required="true">

<Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.CodeIdentifierStringConverter, Microsoft.Practices.RecipeFramework.Library" />

</Argument>

<Argument Name="CustomerProjectName" Required="true">

<Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />

</Argument>

<Argument Name="BusinessProjectName">

<ValueProvider Type="Evaluator" Expression="Prefix.$(CustomerName).$(CustomerProjectName).Business">

<MonitorArgument Name="CustomerName" />

<MonitorArgument Name="CustomerProjectName" />

</ValueProvider>

</Argument>

<Argument Name="CommonProjectName">

<ValueProvider Type="Evaluator" Expression="Prefix.$(CustomerName).$(CustomerProjectName).Common">

<MonitorArgument Name="CustomerName" />

<MonitorArgument Name="CustomerProjectName" />

</ValueProvider>

</Argument>

<Argument Name="DalProjectName">

<ValueProvider Type="Evaluator" Expression="Prefix.$(CustomerName).$(CustomerProjectName).DAL">

<MonitorArgument Name="CustomerName" />

<MonitorArgument Name="CustomerProjectName" />

</ValueProvider>

</Argument>

<Argument Name="WebUIProjectName">

<ValueProvider Type="Evaluator" Expression="Prefix.$(CustomerName).$(CustomerProjectName).WebUI">

<MonitorArgument Name="CustomerName" />

<MonitorArgument Name="CustomerProjectName" />

</ValueProvider>

</Argument>

<Argument Name="WinUIProjectName">

<ValueProvider Type="Evaluator" Expression="Prefix.$(CustomerName).$(CustomerProjectName).WinUI">

<MonitorArgument Name="CustomerName" />

<MonitorArgument Name="CustomerProjectName" />

</ValueProvider>

</Argument>

<Argument Name="FinalSolutionName">

<ValueProvider Type="Evaluator" Expression="Prefix.$(CustomerName).$(CustomerProjectName).sln">

<MonitorArgument Name="CustomerName" />

<MonitorArgument Name="CustomerProjectName" />

</ValueProvider>

</Argument>

</Arguments>

<Actions>

<Action Name="AddProjectReferences" Type="Prefix.SmartToolsGAT.Actions.AddProjectReferencesAction, Prefix.SmartToolsGAT">

<Input Name="CustomerName" RecipeArgument="CustomerName" />

<Input Name="CustomerProjectName" RecipeArgument="CustomerProjectName" />

</Action>

<Action Name="RenameSolution" Type="Prefix.Actions.RenameSolutionAction, Prefix.SmartToolsGAT">

<Input Name="NewSolutionName" RecipeArgument="FinalSolutionName" />

</Action>

</Actions>

</Recipe>

<WizardData>

<Template xmlns="http://schemas.microsoft.com/pag/gax-template"

SchemaVersion="1.0"

Recipe="CreateSolution">

<References>

<RecipeReference Name="CreateProject" Target="\" />

<RecipeReference Name="AddWebProject" Target="\"/>

</References></Template>

</WizardData>

I just want the actions to execute when a new project is created using this guidance package. I know it starts off with another recipe, but I referenced it as here above, so normally it should execute or not?

I'm sorry if I'm asking silly questions, but I'm a newbie regarding GAT!

Thanks for all your help!

Nocto

Nocto  Wednesday, December 19, 2007 3:33 PM

Ok, well what you have there is just a reference and that's no means that the recipe will automatically execute after the template unfolding. That just a reference, is like a declaration to place a command called "CreateProject" @ Root

There you just can add references to bound recipes, in your sample that means that when you do a right click over a Root (/ or Solution Node), you will see a command called "CreateProject" which able to execute the recipe.

Take a quick look to GAX documentation or to the default Guidance Package which is created by GAT. There is explained what's the difference between bound and unbound recipes and how you can bind that recipes.

Anyway if you have troubles don't hesitate to ask.

jose.
Jose Escrich  Wednesday, December 19, 2007 3:53 PM

You can use google to search for other answers

Custom Search

More Threads

• Newbie question: <AssemblyName>me.myDAL</AssemblyName> not working?
• Recipe framework error
• On Package Load Templates Exception?
• An Alternate way to create a Deployment Project for a Guidance Package
• Change the buttontext
• How to add a parameter to the path of the file?
• Add View context menu not displayed for some projects
• Error installing GAT on VS 2005 (German)
• trouble installing the Web Service Software Factory
• Packaging both Vb and CS in one Guidance Package