2010年1月24日 星期日

Installer 類別裡如何取得實際安裝路徑?

會被帶入 Context.Parameters 的參數裡, 安裝路徑的名稱是"assemblypath"
可以用以下程式追蹤得知安裝程式還帶那些參數進去.

public override void Install(IDictionary stateSaver)
{
base.Install(stateSaver);
string msg = "";
foreach (DictionaryEntry entry in this.Context.Parameters)
{
msg += entry.Key + "," + entry.Value + "\r\n";
}
MessageBox.Show("Install..." + msg);
}

如何清除GAC 的Download cache?

很簡單
gacutil /cdl

就可以了~

參考: http://florent.clairambault.fr/gac-download-cache