如何在.wixproj文件中引用WixDifxAppExtension?

问题描述 投票:1回答:2

我正在使用WiX toolset开发Windows安装程序。我没有直接调用WiX工具,而是创建了一个.wixproj file并使用MsBuild进行构建。我的安装程序需要安装驱动程序,因此我决定尝试使用Difxapp Extension

问题是,我不知道如何在.wixproj文件中正确添加Difxapp扩展名。在ItemGroup标记内,我添加了<WixExtension Include="WixDifxAppExtension" />,这导致MSBuild在调用Light.exe时添加参数-ext "C:\Program Files (x86)\WiX Toolset v3.8\bin\WixDifxAppExtension.dll"。但是,我认为我需要做其他事情,因为我收到以下错误消息:

error LGHT0094: Unresolved reference to symbol 'CustomAction:MsiProcessDrivers'

根据this thread from 2009,我需要向light.exe命令添加另一个参数,并且该参数应为:

"$(WIX)bin\difxapp_x86.wixlib"

没有人可以共享一个示例.wixproj来显示需要如何引用WixDifxAppExtension吗?或者,有人知道如何仅添加任意链接程序参数吗?一定有办法。

这是我当前的.wixproj文件:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProductVersion>1.0.4</ProductVersion>
    <DefineConstants>ProductVersion=$(ProductVersion)</DefineConstants>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProjectGuid>{FACDEEA0-F843-4ca7-8FCC-09AFFFCAAE85}</ProjectGuid>
    <SchemaVersion>2.0</SchemaVersion>
    <OutputName>installer-$(ProductVersion)</OutputName>
    <OutputType>Package</OutputType>
    <DefineSolutionProperties>false</DefineSolutionProperties>
    <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <OutputPath>bin\$(Configuration)\</OutputPath>
    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
    <DefineConstants>Debug;ProductVersion=$(ProductVersion)</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <OutputPath>bin\$(Configuration)\</OutputPath>
    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="installer.wxs" />
    <WixExtension Include="WixUIExtension" />
    <WixExtension Include="WixDifxAppExtension" />
    <!-- TODO: add  "$(WIX)bin\difxapp_x86.wixlib" -->
  </ItemGroup>
  <Import Project="$(WixTargetsPath)" />
</Project>
wix wix-extension wix3.8
2个回答
3
投票

添加WixLibrary项目:

<WixLibrary Include="difxapp_x86.wixlib" />


0
投票

我刚刚将'difxapp_x86.wixlib'添加到'参考'中。这样就消除了错误“对符号'CustomAction:MsiProcessDrivers'的未解析引用”。

© www.soinside.com 2019 - 2024. All rights reserved.