The role of Light.exe
If you've added a .wxl
file to your WiX project in Visual Studio, or maybe several .wxl
files—perhaps en-us.wxl
for English and es-es.wxl
for Spanish—building the project will create an installer for each one. They'll be stored in the bin
folder under separate subfolders. This is without declaring which languages you want to build for. By default, Visual Studio detects all of the languages you've added and creates an MSI for each one.
The commands used to build the MSIs are the same that you learned about in Chapter 9, Working from the Command Line. First, Visual Studio calls Candle to compile the .wxs
source code files into .wixobj
object files. Then, it makes a distinct call to Light for each .wxl
file, passing the -loc
and -cultures
flags. The following is the build process, truncated and formatted for readability:
Candle.exe -out obj\Debug\ -arch x86 Product.wxs Light.exe -out "bin\Debug\en-us\MyInstaller.msi" -cultures:en-us -loc en-us.wxl -loc es-es...