WiX creating obj file in strange place
In my WiX 3.5 project I'm including a wxs file via a link. I.e., the wxs file is not in the project folder, it is fairly far away in the folder structure, and is included using Visual Studio's "Add as a link" facility.
This is working fine. But it does have the strange side-effect that WiX creates the obj file for the included wxs in a strange location, creating several folders to somewhat (but not correctly) mimic the path structure between the WiX project folder and the folder where the wxs file is located.
Is there any way to avoid this, so WiX creates this obj file in the same place as the other obj files, or alternatively creates it ne开发者_如何学Cxt to the wxs file, and not half way in between?
I always thought this is what -out
command-line parameter of candle.exe
is for. Have you tried playing with it?
It turns out this is a bug in WiX 3.5, and has been documented in a blog entry here: http://www.paraesthesia.com/archive/2011/02/07/wix-3-5-2519-0-incorrect-intermediate-object-path-for.aspx
The blog article also helpfully provides a work-around, although it didn't quite work for me. For my situation I had to add an extra backslash to the path, so instead of
<ObjectPath>obj\$(Configuration)</ObjectPath>
I needed to specify
<ObjectPath>obj\$(Configuration)\</ObjectPath>
Thanks to Travis Illig for the blog article, thanks to Edwin Castro on the WiX-Users mailing list for pointing me to the blog article, and thanks to Yan Sklyarenko for his help too.
EDIT:
The plot thickens - it's not a bug, it's a feature!
And it's not in WiX, per se, but in Votive / MSBuild.
https://sourceforge.net/mailarchive/message.php?msg_id=27244936
Anyway, the important thing is that it's easy to fix with the work-around suggested by Travis Illig in his blog article.
精彩评论