如何在代码中设置$ CustomParameter $的值?

时间:2018-07-25 11:45:53

标签: c# visual-studio vsix project-template

我正在开发项目模板,我需要一个自定义参数,但是我不知道如何在我的代码中将其设置为vstemplate文件中的值:

<CustomParameter Name="$CustomParameter$" Value=""/>  
<CustomParameter Name="$CustomParameter$" Value=""/>  

在此方法中,我可以将Dictionary的值设置为$ CustomParameter $,但是在生成代码时,$ CustomParameter $仍然存在。

public void RunStarted(object automationObject,
        Dictionary<string, string> replacementsDictionary,
        WizardRunKind runKind, object[] customParams)
    {
        replacementsDictionary.Add("$CustomParameter$", name);
    }

0 个答案:

没有答案