how to add CustomAction.CA.dll file into Wixsharp Project?

Sep 21, 2015 at 3:03 PM
Edited Sep 21, 2015 at 3:41 PM
how i can add CustomAction.CA.dll directly into wixsharp project?
i don't want to package CustomAction.dll into CustomAction.CA.dll every time i create a new setup.
Sep 22, 2015 at 4:31 AM
It is atypical use-case for Wix# thus there is no native solution for this but you can achieve it quite easily with either XML-Includes or XML-Injection.

While the functionality has been available for quite sometime the latest code base contains dedicated Embedding_CA_Package sample demonstrating both techniques.

XML-Includes approach for embedding myaction.CA.dll package:
var project = new Project("CustomActionTest",
                  new Binary(new Id("MyAction_File"), "myaction.CA.dll"));

where myaction.wxi contains:
  <CustomAction Id="MyAction" BinaryKey="MyAction_File" DllEntry="MyAction" Impersonate="yes" Execute="immediate" Return="check" />

    <Custom Action="MyAction" After="InstallInitialize">(NOT Installed)</Custom>
Sep 22, 2015 at 9:48 AM
Thanks for the answer.
But i can not find project.AddXmlInclude("myAct.wxi"); function refrence in Wixsharp.dll Version :
Sep 22, 2015 at 11:27 AM
Sorry, forgot to specify. This method extension is in the latest NuGet package v1.0.26.1.
It is a HotFix release so it needs to be downloaded with:
Install-Package WixSharp.bin -Pre