I am creating a batch file using wix light and candle to create an msi for a project.
I am receiving this error when i run the batch file:
light.exe : error LGHT0307 : Either 'Microsoft.Tools.WindowsInstallerXml.AssemblyDefaultWixExtensionAttribute' was not defined in the assembly or the type defined in extension 'C:\Users\User1\Documents\testProj\CustomAction\bin\Debug\CustomAction.dll' could not be loaded.
I have checked the filepath of the CustomAction.dll and verified it is correct. I have added the CustomAction.dll extension to the light command. I am running this batch file from the windows command line in administrator mode.
Batch File
----Line 1-----
"%WIX%bin\candle" *.wxs -dCustomAction.TargetDir="C:\Users\User1\Documents\testProj\CustomAction\bin\Debug\" -o obj\Debug\
----Line 2----------
"%WIX%bin\light" obj\Debug*.wixobj -ext "C:\Users\User1\Documents\testProj\CustomAction\bin\Debug\CustomAction.dll" -ext "C:\Users\User1\Documents\testProj\CustomAction\bin\Debug\CustomAction.CA.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin" -ext WixIIsExtension -ext WixNetFxExtension -ext WixUIExtension -ext WixUtilExtension -ext "C:\Users\User1\Documents\testProj\Utils\bin\Debug\Utils.dll" -o obj\Debug\CommandLineInstaller.msi
I expect this to properly generate an msi file but i am receiving error code error LGHT0307
.
I have removed CustomActino.dll and CustomAction.CA.dll from the candle command line. I have removed C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension.dll and included -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin" to the light command. Currently i am receiving this error " light.exe : error LGHT0144 : The extension 'C:\Program Files (x86)\WiX Toolset v3.11\bin' could not be loaded because of the following reason: Could not load file or assembly 'file:///C:\Program Files (x86)\WiX Toolset v3.11\bin' or one of its dependencies. Access is denied."
Here is the new command line: "%WIX%bin\light" obj\Debug*.wixobj -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin" -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin" -ext WixIIsExtension -ext WixNetFxExtension -ext WixUIExtension -ext WixUtilExtension -ext "C:\Users\User1\Documents\testProj\Utils\bin\Debug\Utils.dll" -o obj\Debug\CommandLineInstaller.msi
Wix.dll
. On second read that is probably something else, leaving this in still. – Stein Åsmul