OK, I found the solution.
Apparently light.exe has an unusual command-line convention for the WiX extensions dlls. Yes we all know that you need to pass the extension with the command line param
You can adjust your code as below and it will compile:
The next release will have a new feature: support for WixLib files thus the you will be able to add libs as below:
Saying that I will see if I can squeeze native support for Driver element in the next release.
Apparently light.exe has an unusual command-line convention for the WiX extensions dlls. Yes we all know that you need to pass the extension with the command line param
-ext
. However in case of WixDifxAppExtension.dll it isn't enough and difxapp_x64.wixlib needs to be passed as well. Wixlib is a collection of wixobjs. This is a bit unintuitive but it is what it is.You can adjust your code as below and it will compile:
project.LightOptions += "\"" + System.IO.Path.Combine(Compiler.WixLocation, "difxapp_x64.wixlib") + "\" "; project.BuildMsm();
project.LibFiles.Add(io.Path.Combine(Compiler.WixLocation, "difxapp_x64.wixlib"));