我正在使用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”
答案 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