在 VS 2019 中使用带有项目模板的向导:向导不起作用

问题描述

我正在尝试通过参考这篇文章为我的项目模板创建一个向导。

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

我已经完成了文档中的所有步骤。但是当我尝试创建一个新项目时,它没有显示表单,也没有使用项目模板的更新版本。

它给出了以下错误

enter image description here

RunStarted 方法如下所示:

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());
            }
        }

您可以在此处查看完整代码 - https://github.com/kalpanibhagya/ProjectTemplateRacr

解决方法

问题出在 VSIX 项目中 WizardImplementation.cs 类中的命名空间。它是 MyProjectWizard 但它应该是 WizardRacr

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...