1
我正在实施项目模板的向导,我想要获取用户在新建项目窗口中选择的项目/解决方案路径。我知道有某些参数,如$ saferootprojectname $拿到项目的名称,但不知道如何获取位置路径获取VS项目模板向导中解决方案/项目的位置
问候
我正在实施项目模板的向导,我想要获取用户在新建项目窗口中选择的项目/解决方案路径。我知道有某些参数,如$ saferootprojectname $拿到项目的名称,但不知道如何获取位置路径获取VS项目模板向导中解决方案/项目的位置
问候
上RunStarted方法,使用replacementsDictionary [“$ destinationdirectory $”]包含目的地目录。
public void RunStarted(object automationObject, Dictionary<string,string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
{
string Path=replacementsDictionary["$destinationdirectory$"];
}
您可以在生成的代码文件中使用“$ destinationdirectory $”。我找到答案here