如何解决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 举报,一经查实,本站将立刻删除。