2013-07-09 169 views
0

我創建了一個安裝到數據庫中執行腳本。但是,當我試圖運行安裝程序時,出現了以下我從日誌中取出的錯誤。WIX自定義操作執行失敗

Doing action: VerifyConnection Action 12:03:17: VerifyConnection. 
Action start 12:03:17: VerifyConnection. MSI (c) (38:E0) 
[12:03:17:739]: Invoking remote custom action. DLL: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp, Entrypoint: VerifyConnection MSI (c) (38:A4) [12:03:17:741]: Cloaking enabled. MSI (c) (38:A4) 
[12:03:17:741]: Attempting to enable all disabled privileges before calling Install on Server MSI (c) (38:A4) 
[12:03:17:742]: Connected to service for CA interface. MSI (c) (38:54) 
[12:03:17:788]: Note: 1: 1723 2: VerifyConnection 3: VerifyConnection 4: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action VerifyConnection, entry: VerifyConnection, library: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp MSI (c) (38:54) 
[12:03:19:186]: Product: CRMnext -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action VerifyConnection, entry: VerifyConnection, library: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp 

Action ended 12:03:19: VerifyConnection. Return value 3. 
DEBUG: Error 2896: Executing action VerifyConnection failed 

任何想法如何解決這個問題???

+0

根據錯誤消息「此安裝所需的DLL來完成不能被運行「。你有沒有試圖找到這裏提到的DLL? –

+0

我正在使用我的自定義操作項目的後期構建事件中使用makeSFxCA.exe的一個dll包。在調用VerifyConnection操作時,可能有可能它所需的dll不可用。 – Adiee

回答

0
  1. 確保您的行爲有正確的簽名;特別是該方法需要是「公共」和「靜態」,即沿「公共靜態ActionResult doSomething(會話會話)」的東西
  2. 用「CustomAction」屬性標記該mehtod,因此它被導出
  3. 當在一個DLL中實現多個自定義操作處理,確保你沒有運行到一個已知的bug MakeSfxCA(參見http://wixtoolset.org/issues/4502/Adding a new Custom Action to a project prevents an existing Custom Action from being run