如何将CustomAction.CA.dll嵌入MSI?

时间:2019-08-08 08:25:52

标签: wix windows-installer custom-action

我正在使用wix toolset创建MSI版本。

这是Product.wxs文件中的二进制源。

    <Binary Id="BI.CA" 
         SourceFile="..\..\CustomAction\bin\$(var.Configuration)\CustomAction.CA.dll" />

MSI在本地生成并按预期工作,但在构建计算机上失败,并显示以下错误。

  

找不到CustomAction.CA.dll

我看到CustomAction.CA.dll存在于构建机器中,但没有出现我指定的路径。

如何将这个dll嵌入到MSI中?

更新

在构建机器中,我在这里看到DLL

  

E:\ BuildAgent \ 1 \ b \ CustomAction.CA.dll”

1 个答案:

答案 0 :(得分:2)

当您的DLL的名称为CA时,不应该这样!然后,您需要在<Binary Id="BI.CA" SourceFile="..\..\CustomAction\bin\$(var.Configuration)\CustomAction.CA.CA.dll" />

处将CA加倍

ModelCheckpoint是DLL的内部后缀,但自定义操作库的输出/目标名称中不应包含该后缀。

您有两个选择:

a)从“定制操作”项目的输出目标中删除CA
b)在MSI-Project Binary Element中引入第二个CA

另请参阅How to execute a WiX custom action DLL file with dependencies