[英]Wix Returning the error “No CA or UI entry points found in module” but [CustomAction] is used in dll
首先,對混淆的屏幕截圖表示歉意,但不包括代碼中的全名。
我在嘗試使用Wix Framework從dll使用自定義操作時遇到問題。
我正在使用Wix 3.10.2
我的解決方案下有一個名為Install.CustomAction的C#Custom Action項目。 然后,在主要的Wix項目中引用它。 你可以在這里看到
我在主Product.wxs文件中將CA dll引用為二進制文件
<Binary Id="CustomActions.dll" SourceFile="$(var.<porjectname>.Install.CustomAction.TargetDir)<projectname>.CustomAction.CA.dll"/>
現在在一個片段中,我引用了這樣的動作
<CustomAction Id="CA_RestoreDB" BinaryKey="CustomActions.dll" DllEntry="RestoreMobileDB" Execute="immediate" Return="check" />
<InstallExecuteSequence>
<Custom Action="CA_RestoreDB" After="InstallFinalize"/>
</InstallExecuteSequence>
因此,到目前為止,我希望一切都能正常進行。
在名為CustomAction.cs的實際c#文件中,我使用[CustomAction]屬性進行了此設置
[CustomAction]
public ActionResult RestoreMobileDB(Session session)
{
//string installPath = session.GetTargetPath(TARGETDIR);
string x = session["INSTALLFOLDER"];
session.Log("Begin CustomAction1");
doSomeStuff(x, session);
return ActionResult.Success;
}
到目前為止,一切都看起來不錯,並且正在按我的期望工作。 但是當我編譯所有內容時,我得到了這個錯誤
Severity Code Description Project File Line Suppression State
Error The command ""C:\Program Files (x86)\WiX Toolset v3.10\bin\..\sdk\MakeSfxCA.exe" "C:\Work Files\Development\<product>\<solution>\<project>.Install.CustomAction\obj\x86\Release\<project>.Install.CustomAction.CA.dll" "C:\Program Files (x86)\WiX Toolset v3.10\bin\..\sdk\x86\SfxCA.dll" "C:\Work Files\Development\<product>\<solution>\<project>Install.CustomAction\obj\x86\Release\<project>.Install.CustomAction.dll" "C:\Program Files (x86)\WiX Toolset v3.10\SDK\Microsoft.Deployment.WindowsInstaller.dll;C:\Work Files\Development\<product>\<solution>\<project>.Install.CustomAction\CustomAction.config"" exited with code 1. <project>.Install.CustomAction
隨后出現此錯誤
在模塊中找不到CA或UI入口點
您有什么可能的原因嗎? 我已經指定了一個入口點,並在我的.wxs文件中引用了dll,但它似乎對我不起作用。
我認為必須是:
public static ActionResult ...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.