Hello Everybody,
I am using Software factory toolkit
I create a new Argument named Fameworkat CreateSolution.Xml file
My CreateSolution.Xml is as under:
**************CreateSolution.xml*******************************************
<Arguments>
<Argument Name="SolutionName">
<Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.RegexMatchStringConverter, Microsoft.Practices.RecipeFramework.Library"
Expression="[a-zA-Z][a-zA-Z_0-9]*(\.[a-zA-Z][a-zA-Z_0-9]*)*"/>
<ValueProvider Type="ExpressionEvaluatorValueProvider" Expression="$(safeprojectname)"/>
</Argument>
<Argument Name="Framework" Type="System.String"/>
</Arguments>
<GatheringServiceData>
<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
<Pages>
<Page>
<Title>New Solution</Title>
<Fields>
<Field ValueName="Framework" Label=" Framework Location"/>
</Page>
</Pages>
</Wizard>
</GatheringServiceData>
<Actions>
<Action Type="Test.Actions.CreateDirectory,Test" Name="CreateDir">
<Input Name="Framework" RecipeArgument="Framework" >
</Input>
</Action>
********************************************************************************************
I want to get value of Argument Framework at my CreateDirectory.cs(Action file).
I do at CreateDirectory.cs
************************CreateDirectory.cs************************************************
public class CreateDirectory: ActionBase
{
private string framework ;
[Microsoft.Practices.WizardFramework.CustomWizardPage.RecipeArgument]
public string Framework
{
set
{
framework = value;
}
}
protected override void OnExecute()
{}
protected override void OnUndo()
{}
************************************************************************************
Note:framework is a private variable declare at Createdirectory.cs file while
Framework is the Argument declare at CreateSolution.xml file.
In Place of [Microsoft.Practices.WizardFramework.CustomWizardPage.RecipeArgument]
I also Try [Input]
But same problem is occur with both
************************************************************************************
Build and register is successfull but when I start my new above created package
I get the following error
*****************************************************************************************
Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe CreateSolution. Error was: Action CreateDir failed to execute:
An exception occurred during the binding of reference or execution of recipe CreateSolution. Error was: Action CreateDir failed to execute:
Property Framework does not exist on type Test.Actions.CreateDirectory..
You can remove the reference to this recipe through the Guidance Package Manager..
You can remove the reference to this recipe through the Guidance Package Manager. ---> Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe CreateSolution. Error was: Action CreateDir failed to execute:
Property Framework does not exist on type Test.Actions.CreateDirectory..
You can remove the reference to this recipe through the Guidance Package Manager.
at Microsoft.Practices.RecipeFramework.Recipe.SetupInputs(IAction action, Action config, IDictionary actions, IDictionaryService arguments)
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.ExecuteFromTemplate(String recipe, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.ExecuteRecipe(Boolean executeActions)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.RunFinished()
**************************************************************************************
Please Help me.
Thanks