Kalpani
Kalpani

Reputation: 185

Using wizards with project templates in VS 2019 : Wizard is not working

I'm trying to create a wizard for my project template by referring to this article.

https://learn.microsoft.com/en-us/visualstudio/extensibility/how-to-use-wizards-with-project-templates?view=vs-2019

I have done all the steps as in the documentation. But when I try to create a new project it doesn't show the form and it didn't use the updated version of the project template.

It gives following error.

enter image description here

RunStarted method looks like following:

public void RunStarted(object automationObject,
            Dictionary<string, string> replacementsDictionary,
            WizardRunKind runKind, object[] customParams)
        {
            try
            {
                // Display a form to the user. The form collects
                // input for the custom message.
                inputForm = new UserInputForm();
                inputForm.ShowDialog();

                customMessage = UserInputForm.CustomMessage;

                // Add custom parameters.
                replacementsDictionary.Add("$custommessage$",
                    customMessage);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }

You can check the full code here - https://github.com/kalpanibhagya/ProjectTemplateRacr

Upvotes: 2

Views: 682

Answers (1)

Kalpani
Kalpani

Reputation: 185

Issue was with the namespace in WizardImplementation.cs class in VSIX project. It was MyProjectWizard But it should be WizardRacr.

Upvotes: 2

Related Questions