Wix 3.5 预处理器扩展 - 未定义的预处理器函数
我只是将 Wix 3.5 与 Visual Studio 2010、Windows 7 一起使用。我无法运行自定义预处理器扩展
。我在 .NET 3.5 中创建扩展项目。并将编译好的dll复制到Wix 3.5程序文件中,并在扩展项目属性中设置引用路径,但Wix项目构建仍然失败我的扩展上有“未定义的预处理器函数”。
例子: 扩展项目:WixFileVersionExtension(来自 wixfileversionext.codeplex.com) Wix 程序文件:“C:\Program Files\Windows Installer XML v3.5\bin”
我错过了什么吗?谷歌无法回答我。
更新: 这是一个错误,已在此处报告 http:// /sourceforge.net/tracker/?func=detail&atid=642714&aid=3212304&group_id=105970
更新: 不要在 VS 项目属性中使用参考路径,如此处所述 http ://wix.sourceforge.net/manual-wix3/votive_property_pages.htm 参考路径部分允许您定义在查找参考(WiX 扩展和 WiX 库)时要使用的路径
或将扩展 dll 复制到 Wix 文件夹中,如下所述 http://wix.sourceforge.net/ Manual-wix3/extension_development_intro.htm 与所有其他 WiX 扩展 DLL 一起放置在 WiX EXE 旁边
解决方案是:添加引用并浏览扩展dll文件,而不是通过项目添加引用,即使您在一个解决方案中拥有这些项目。如果您想遵循配置、调试或发布,请卸载Wix项目,编辑.wixproj文件并更改..\WixExtension\bin\Debug \WixExtension.dll
到 ..\WixExtension\bin\$(Configuration)\WixExtension.dll
所以它会变成这样:
<ItemGroup>
<WixExtension Include="WixExtension">
<HintPath>..\WixExtension\bin\$(Configuration)\WixExtension.dll</HintPath>
<Name>WixExtension</Name>
</WixExtension>
</ItemGroup>
注意: Wix Visual Studio每当您通过 dll 文件(浏览)添加引用时,项目只会假设它是 Wix 扩展,并且仅假设它是要包含在安装程序<中的应用程序/strong> 每当您通过项目添加引用时。
I just using Wix 3.5 with Visual Studio 2010, Windows 7. I unable to make a custom Preprocessor Extension
run. I create the extension project in .NET 3.5. and copy the compiled dll into Wix 3.5 program files, plus set the Reference Path in the extension project properties but the Wix project build still failed with "undefined preprocessor function" on my extension.
Example:
Extension project: WixFileVersionExtension (from wixfileversionext.codeplex.com)
Wix program files: "C:\Program Files\Windows Installer XML v3.5\bin"
Am I missing something? Google can't answer me.
Update:
This is a bug and has been reported here http://sourceforge.net/tracker/?func=detail&atid=642714&aid=3212304&group_id=105970
Update:
Do not use Reference Path in the VS project property as stated here http://wix.sourceforge.net/manual-wix3/votive_property_pages.htm The Reference Paths section allows you to define paths you want to use when locating references (WiX extensions and WiX libraries)
or copy the extension dll into Wix folder as stated here http://wix.sourceforge.net/manual-wix3/extension_development_intro.htm Placed next to WiX EXEs along with all other WiX extension DLLs
The Solution is: Add Reference and Browse the extension dll file INSTEAD OF Add Reference by Project even if you have those projects in one solution. If you want to follow the Configuration, Debug or Release, unload the Wix project, edit the .wixproj file and change the ..\WixExtension\bin\Debug\WixExtension.dll
to ..\WixExtension\bin\$(Configuration)\WixExtension.dll
so it will become like this:
<ItemGroup>
<WixExtension Include="WixExtension">
<HintPath>..\WixExtension\bin\$(Configuration)\WixExtension.dll</HintPath>
<Name>WixExtension</Name>
</WixExtension>
</ItemGroup>
Note: Wix Visual Studio project will only assume it is Wix Extension whenever you Add Reference by dll file (Browse) and also only assume it is an application to be included in the installer whenever you Add Reference by Project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要添加对实际扩展程序集 (.dll) 的引用,以便 Candle.exe 加载它。等效的命令行是 -ext。
You need to add a reference to the actual extension assembly (.dll) so that Candle.exe loads it. The command-line equivalent is -ext.