本文介绍了如何将CustomAction.CA.dll嵌入MSI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 wix工具集创建MSI构建。

I am using wix toolset to create MSI build.

这里是<$ c中的二进制源$ c> Product.wxs 文件。

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

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

MSI generated and works as expected in local but fails in build machine showing below error.

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

I see that CustomAction.CA.dll is present in the build machine but not the path which I specified.

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

How do I embed this dll in to MSI?

更新

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

In build machine, I see the DLL here


推荐答案

当DLL具有名称 CustomAction.CA.dll 不应这样!然后您需要将 CA 翻倍,在此处<二进制ID = BI.CA
SourceFile = .. \..\CustomAction\bin\ $(var.Configuration)\CustomAction.CA.CA.dll / >

When your DLL has the name CustomAction.CA.dll that should not be! Then you need to double the CA here <Binary Id="BI.CA" SourceFile="..\..\CustomAction\bin\$(var.Configuration)\CustomAction.CA.CA.dll" />

CA 是DLL的内部后缀,但输出/

The CA is an internal postfix for the DLL but the output / target of your Custom Action Library should not have it in the name.

您有两个选择:

a )从自定义操作项目的输出目标中删除CA

b)在MSI-Project Binary Element中引入第二个CA

a) Remove the CA from the output target in Custom Action project
b) Introduce a second CA in MSI-Project Binary Element

另请参见

这篇关于如何将CustomAction.CA.dll嵌入MSI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 23:39