VisualStudioの「Extensions」フォルダーにプログラムでフォルダーをインストールしたい。私が得ることができる最も近いものは、VS100COMNTOOLS環境変数を使用することです。私がやりたいのは、「ツール」フォルダから1レベル戻り、VS100COMNTOOLS .. \ IDE\ExtensionsのようなIDE/Extensionsに移動することです。これは私のコードです:
namespace TemplatesCustomAction
{
public class CustomActions
{
[CustomAction]
public static ActionResult CustomAction1(Session session)
{
var vspath = Environment.GetEnvironmentVariable("VS100COMNTOOLS");
session["VSINSTALLATIONFOLDER"] = string.Format(@"{0}\..\IDE\Extensions", vspath);
return ActionResult.Success;
}
}
}