kudlatiger
kudlatiger

Reputation: 3258

How do I embed CustomAction.CA.dll in to MSI?

I am using wix toolset to create MSI build.

Here is the Binary source in Product.wxs file.

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

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

Could not find CustomAction.CA.dll

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

How do I embed this dll in to MSI?

Update

In build machine, I see the DLL here

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

Upvotes: 1

Views: 1690

Answers (1)

KargWare
KargWare

Reputation: 2183

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" />

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.

You have two options:

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

See also How to execute a WiX custom action DLL file with dependencies

Upvotes: 2

Related Questions