Frage

I am attempting to dynamically name the output of my WiX installer project, so that the resulting MSI is MyProject-Version-Configuration.msi (e.g. MyProject-1.2.0.1325-Debug). Since the name of the output file is set by the linker (light.exe), I thought that I would use the Additional Parameters in the Tool Settings of the WiX project thusly:

-out $(TargetDir)MyProject-$(Version)-$(Configuration)$(TargetExt)

Unfortunately, $(TargetDir) and $(TargetExt) are not being evaluated when the project runs, so light receives:

-out MyProject-1.2.0.1325-Debug

which obviously does not produce the correct output. Given that $(Configuration) is set correctly, I wonder why $(TargetDir) and $(TargetExt) are not?

I can work around the issue by using the post-build event to rename the output file, and then I do have access to the $(TargetDir) and $(TargetExt) properties, but I would like to know why the linker does not receive the correct command.

War es hilfreich?

Lösung

You need to edit .wixproj file and make this change outside Visual Studio. As far as I remember Votive incorrectly escapes some characters (AFAIR it replaces $ with $$).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top