WiX安装程序未安装收集的文件

问题描述

我无法让WiX Installer项目正常运行。我正在通过从项目内的两个不同文件夹中收集文件来构建msi。为此,我在项目wixproj文件(如here中所述)的BeforeBuild任务中使用HeatDirectory。生成两个不同的.wxs文件(每个目录一个)并包含在产品中。 wxs文件包含目录中的所有文件,在运行安装程序时不会安装一个特定的dll。当我检查MSI(使用orca)时,不包含dll。我没有安装单个dll,这是什么意思?

这是wixproj文件中的BeforeBuild任务:

<Target Name="BeforeBuild">
    <PropertyGroup>
      <DefineConstants>SourcePath=$(SolutionDir)\bin\$(Configuration)</DefineConstants>
    </PropertyGroup>        
    <HeatDirectory DirectoryRefId="INSTALLFOLDER" VerboSEOutput="false" AutogenerateGuids="true" GenerateGuidsNow="true" SuppressRootDirectory="true" OutputFile="Generated.wxs" RunAsSeparateProcess="true" PreprocessorVariable="var.sourcePath" Directory="$(SolutionDir)\bin\$(Configuration)" ComponentGroupName="SourceComponentGroup" ToolPath="$(WixToolPath)" />
    <HeatDirectory DirectoryRefId="INSTALLFOLDER" VerboSEOutput="false" AutogenerateGuids="true" GenerateGuidsNow="true" SuppressRootDirectory="true" OutputFile="GeneratedSSL.wxs" RunAsSeparateProcess="true" PreprocessorVariable="var.sourcePath" Directory="$(SolutionDir)SSLProject\bin\$(Configuration)" ComponentGroupName="SourceComponentGroupSSL" ToolPath="$(WixToolPath)" />
  </Target>

并在同一wixproj中:

  <ItemGroup>
    <Compile Include="Generated.wxs" />
    <Compile Include="GeneratedSSL.wxs" />
    <Compile Include="Product.wxs" />
  </ItemGroup>

然后在我的Product.wxs文件中:

<Feature Id="MainApplication" Title="Main Application" Level="1">
  <ComponentGroupRef Id="SourceComponentGroup" />  
  <ComponentRef Id="ApplicationShortcut" />
  <ComponentRef Id="ApplicationShortcutDesktop" />
</Feature>

其中包括两个收割文件夹中的所有文件。...

我注意到的一件事是,在生成文件列表中,未安装的单个文件在收获时被包装在其自己的组件中。我如何使它包含在其余文件中,以便安装?

 <Fragment>
        <ComponentGroup Id="SourceComponentGroupSSL">
            <Component Id="cmpCF9B3A227754E55B2A4622BDADF51333" Directory="INSTALLFOLDER" Guid="*">
                <File Id="fil244CDAED28510644E512EA1DBCB9390F" KeyPath="yes" Source="$(var.sourcePath)\BouncyCastle.Crypto.dll" /><!-- This file does not get installed -->
            </Component>
            <Component Id="cmp03421852CD24008D1EB8C1D6C2FAAD2B" Directory="INSTALLFOLDER" Guid="*">
                <Class Id="{1592F8EC-E78E-3E53-BEA5-494AA2D9709D}" Context="InprocServer32" Description="McMaster.Extensions.CommandLineUtils.LegalFilePathAttribute" ThreadingModel="both" ForeignServer="mscoree.dll">
                    <ProgId Id="McMaster.Extensions.CommandLineUtils.LegalFilePathAttribute" Description="McMaster.Extensions.CommandLineUtils.LegalFilePathAttribute" />
                </Class>
                <Class Id="{16C3C633-9F0B-3F97-8289-F5F4D2E497A1}" Context="InprocServer32" Description="McMaster.Extensions.CommandLineUtils.DirectoryNotExistsAttribute" ThreadingModel="both" ForeignServer="mscoree.dll">
                    <ProgId Id="McMaster.Extensions.CommandLineUtils.DirectoryNotExistsAttribute" Description="McMaster.Extensions.CommandLineUtils.DirectoryNotExistsAttribute" />
                </Class>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)