Hi,
I need to display all the methods from the referenced dlls of a project.
I'm trying to display the currently selected project path in a text box of a Custom wizard page.
i have mentioned an argument like this:
<
Recipe Name="CheckProjectsPopulating" Recurrent="false">
<
Types>
<
TypeAlias Name="Evaluator" Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" />
</
Types>
<
Caption>List ofmethods of Referenced dllsin Current Project</Caption>
<
HostData>
<
Icon ID="630"/>
<
CommandBar Name="Project"/>
</
HostData>
<
Arguments>
<
Argument Name="CurrentProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<
ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.FirstSelectedProject, Microsoft.Practices.RecipeFramework.Library" />
</
Argument>
</
Arguments>
<
GatheringServiceData>
<
Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
<
Pages>
<
Page Type="MyGPTestOnMarchNinteen.Recipes.MyUI.RetrieveClassesAndMethods, MyGPTestOnMarchNinteen">
</
Page>
</
Pages>
</
Wizard>
</
GatheringServiceData>
</
Recipe>
And the code for Custom wizard page is
public
partial class RetrieveClassesAndMethods : CustomWizardPage
{
public RetrieveClassesAndMethods()
{
InitializeComponent();
}
public RetrieveClassesAndMethods(WizardForm wp) : base(wp)
{
InitializeComponent();
}
[
RecipeArgument]
public string CurrentProject
{
set
{
if (value != null)
{
this.textBox1.Text = value.ToString();
}
else
{
this.textBox1.Text = "";
}
}
}
//CurrentProject
private void button1_Click(object sender, EventArgs e)
{
IDictionaryService dictservice = GetService(typeof(IDictionaryService)) as IDictionaryService;
if (string.IsNullOrEmpty(textBox1.Text.ToString()))
dictservice.SetValue(
"CurrentProject", null);
else
dictservice.SetValue(
"CurrentProject", textBox1.Text.ToString());
}
}
I'm getting the below error while running the recipe:
The wizard failed to execute. The error was:
Cannot set property CurrentProject from Custom Page RetrieveClassesAndMethods.
Can anyone help me out whether i need to add anything elseto my code to solve this error.
Regards,
Syamala.