Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Cannot create WizardPage , Constructor on type ... not found
 

Cannot create WizardPage , Constructor on type ... not found

I'm running into the error in the subject and I've tried to fix it for hours now but with no result so far.
I have a Visual Studioproject wizard (Create new project - select project template) and I want to implement this wizard into my software factory.

I'm kind of know my way arround in the GAT but I can't seem to fix this.
In the recipe I've specified the custom wizard page. like this:
<GatheringServiceData>
<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
<Pages>
<Page Type="MyProject.CustomWizardPages.MyWizardPage,MyProject" />
</Pages>
</Wizard>
</GatheringServiceData>

I know the references are ok, otherwise I would get a different error.
So it looks like the runtime cannot find the constructor, while I can verify it is there and marked public.
Could it be it has something to do with the fact that the custom page doesn't inherit from "CustomWizardPage" but from"Microsoft.BizTalk.Wizard.WizardPage"?

Anyone?

The complete exception is this:

Microsoft.Practices.WizardFramework.WizardExecutionException: The wizard failed to execute. The error was:
Cannot create WizardPage , Constructor on type 'MyProject.CustomWizardPages.MyWizardPage' not found.. ---> Microsoft.Practices.WizardFramework.WizardFrameworkException: Cannot create WizardPage , Constructor on type'MyProject.CustomWizardPages.MyWizardPage' not found.. ---> System.MissingMethodException: Constructor on type 'MyProject.CustomWizardPages.MyWizardPage' not found.
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Microsoft.Practices.WizardFramework.WizardForm.CreateWizardPage(Page page)
--- End of inner exception stack trace ---
at Microsoft.Practices.WizardFramework.WizardForm.CreateWizardPage(Page page)
at Microsoft.Practices.WizardFramework.WizardForm.EndInit()
at Microsoft.Practices.WizardFramework.WizardForm..ctor(IServiceProvider provider, Wizard wizardConfig, String basePath)
at Microsoft.Practices.WizardFramework.WizardForm..ctor(IServiceProvider provider, Wizard wizardConfig)
at Microsoft.Practices.WizardFramework.WizardGatheringService.Microsoft.Practices.Common.Services.IValueGatheringService.Execute(XmlElement data, Boolean allowSuspend)
--- End of inner exception stack trace ---
at Microsoft.Practices.WizardFramework.WizardGatheringService.Microsoft.Practices.Common.Services.IValueGatheringService.Execute(XmlElement data, Boolean allowSuspend)
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.AssetReference.Execute()
at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()
Greyfox  Monday, June 23, 2008 2:44 PM
I sort of found a solution.

The class should inherit from CustomWizardPage but it is more important to have the correct constructor:

public MyCustomPage(WizardForm parent)
: base(parent)
{
// This call is required by the Windows Form Designer.
InitializeComponent();
}

Without this constructor it gives the error.
  • Proposed As Answer byvga Thursday, July 03, 2008 2:33 AM
  •  
Greyfox  Tuesday, June 24, 2008 3:13 PM
That is correct, you need to inherit from GAX's CustomWizardPage and you need to provide a public constructor with the specified signature so GAX will be able to instantiate this through reflection.
Working with GAX/GAT/DSL? Download SFT now! http://softwarefactoriestoolkit.net
vga  Thursday, July 03, 2008 2:34 AM

You can use google to search for other answers

Custom Search

More Threads

• Text Templates And Existing Files
• Creating a Recipe for updating a config file
• GAX 1.4 won't install
• Failed to Register Data Access Guidance Package
• Upgrading Repository Factory to run in VS2008
• Server Application Unavailable
• How to include required softwares in deployment process
• Anybody has an idea how to specify a icon file for a recipe. (Please help)
• Tools.GenerateLocalResource
• Custom developed Guidance Automation Package not listed under VisualStudio template