Wix 3.5 预处理器扩展 - 未定义的预处理器函数 [英] Wix 3.5 preprocessor extension - undefined preprocessor function

查看:53
本文介绍了Wix 3.5 预处理器扩展 - 未定义的预处理器函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是在 Visual Studio 2010、Windows 7 中使用 Wix 3.5.我无法运行自定义 预处理器扩展.我在 .NET 3.5 中创建了扩展项目.并将编译后的 dll 复制到 Wix 3.5 程序文件,并在扩展项目属性中设置参考路径,但 Wix 项目 构建仍然失败未定义的预处理器函数"在我的扩展上.

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.

示例:扩展项目:WixFileVersionExtension(来自wixfileversionext.codeplex.com)Wix 程序文件:C:\Program Files\Windows Installer XML v3.5\bin"

Example: Extension project: WixFileVersionExtension (from wixfileversionext.codeplex.com) Wix program files: "C:\Program Files\Windows Installer XML v3.5\bin"

我错过了什么吗?Google 无法回答我.

Am I missing something? Google can't answer me.

更新:这是一个错误,已在此处报告 http:///sourceforge.net/tracker/?func=detail&atid=642714&aid=3212304&group_id=105970

Update: This is a bug and has been reported here http://sourceforge.net/tracker/?func=detail&atid=642714&aid=3212304&group_id=105970

更新:不要在 VS 项目属性中使用 Reference Path,如下所述 http://wix.sourceforge.net/manual-wix3/votive_property_pages.htm 引用路径"部分允许您定义在定位引用(WiX 扩展和 WiX 库)时要使用的路径

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)

或将扩展dll复制到Wix文件夹中,如下所述http://wix.sourceforge.net/manual-wix3/extension_development_intro.htm 与所有其他 WiX 扩展 DLL 一起放置在 WiX EXE 旁边

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

解决方案是:添加引用浏览扩展dll文件代替添加引用>项目,即使您在一个解决方案中拥有这些项目.如果您想按照配置、调试发布,卸载 Wix 项目,编辑 .wixproj 文件并更改 ..\WixExtension\bin\Debug\WixExtension.dll..\WixExtension\bin\$(Configuration)\WixExtension.dll 所以它会变成这样:

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>

注意:只要您通过 dll 文件(浏览)添加引用,Wix Visual Studio 项目只会假定它是 Wix 扩展假设它是一个应用程序,只要您通过 项目添加引用,就会包含在安装程序中.

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.

推荐答案

您需要添加对实际扩展程序集 (.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.

这篇关于Wix 3.5 预处理器扩展 - 未定义的预处理器函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆