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