我有被檢索上打開我收到以下錯誤exeConfiguration從Visual Studio安裝project.Now參數的安裝程序類..在加載配置文件中獲取錯誤,參數無效
Error 1001:An error occurred loading a configuration file.
The parameter 'exePath' is invalid.
Parameter name:exepath-->The Parameter 'exePath' is invalid.
Parameter name:exePath
這裏是我的Installer.cs代碼..
public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install(stateSaver);
string targetDirectory = Context.Parameters["targetdir"];
string param1 = Context.Parameters["Param1"];
string param2 = Context.Parameters["Param2"];
string param3 = Context.Parameters["Param3"];
string exePath = string.Format("{0}TechSoft CallBill.exe", targetDirectory);
Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
config.AppSettings.Settings["Param1"].Value = param1;
config.AppSettings.Settings["Param2"].Value = param2;
config.AppSettings.Settings["Param3"].Value = param3;
config.Save();
}
請幫我弄清楚這個錯誤,因爲我無法弄清楚。 任何建議熱烈歡迎。 在此先感謝
你試圖加載配置屬於不同的項目?或者它屬於安裝程序類項目? – Kurubaran
@AccessDenied非常感謝你sir.Config屬於安裝程序類project.Here我附加項目classpath圖像。 – Adi
@AccessDenied請先生告訴我我哪裏出錯了? – Adi