WiX 在奇怪的地方创建 obj 文件
在我的 WiX 3.5 项目中,我通过链接包含了一个 wxs 文件。即,wxs 文件不在项目文件夹中,它在文件夹结构中相当远,并且是使用 Visual Studio 的“添加为链接”工具包含的。
这工作正常。但它确实有一个奇怪的副作用,即 WiX 在一个奇怪的位置为包含的 wxs 创建 obj 文件,创建几个文件夹来某种程度上(但不正确)模仿 WiX 项目文件夹和 wxs 文件所在文件夹之间的路径结构位于。
有什么方法可以避免这种情况,让 WiX 在与其他 obj 文件相同的位置创建此 obj 文件,或者在 wxs 文件旁边创建它,而不是在两者之间?
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 next to the wxs file, and not half way in between?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我一直认为这就是
candle.exe
的-out
命令行参数的用途。你尝试过玩它吗?I always thought this is what
-out
command-line parameter ofcandle.exe
is for. Have you tried playing with it?事实证明这是 WiX 3.5 中的一个错误,并且已记录在此处的博客文章中:
http://www.paraesthesia.com/archive/2011/02/07/wix-3-5-2519-0-in Correct-intermediate-object-path-for.aspx
博客文章还提供了有用的信息一种解决方法,尽管它对我来说不太有效。对于我的情况,我必须在路径中添加一个额外的反斜杠,因此
我不需要指定
感谢 Travis Illig 的博客文章,感谢 WiX-Users 邮件列表上的 Edwin Castro 将我指向博客文章,以及也感谢 Yan Sklyarenko 的帮助。
编辑:
情节变得更加复杂 - 这不是一个错误,而是一个功能!
它本身不在 WiX 中,而是在 Votive / MSBuild 中。
https://sourceforge.net/mailarchive/message.php?msg_id=27244936
不管怎样,重要的是,使用 Travis Illig 在他的博客文章中建议的解决方法很容易解决这个问题。
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
I needed to specify
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.