我正在开发项目模板,我需要一个自定义参数,但是我不知道如何在我的代码中将其设置为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);
}