Web サービス用の WIX 3.6 インストーラーに取り組んでいます。しかし、HeatDirectory を使用して必要な出力をすべて収集しようとしたときに問題が発生しました。何を試しても、収集されたファイルごとに次のエラーが発生します。
システムはファイル 'SourceDir\Some.dll...' を見つけることができません
エラーは WcfService.wxs で発生します。奇妙な点は、プロジェクト ファイル (以下) の heatdirectory セクションによって WcfService.wxs が自動的に作成されることです。 そもそも WcfService.wxs を作成するために、.dll がどこにあるのかを知る必要がある場合、これらの .dll を見つけることができないと言って、どうして爆発するのでしょうか? これらのエラーは、私が読んだチュートリアルのいずれかから (そのままの状態で) WIX サンプル プロジェクトをダウンロードしてビルドしたときにも発生します。
目標: .dll インクルードを可能な限り自動化する (つまり、ハーベスティングを利用して依存関係プロジェクトを処理するなど)。
Win 7 64 ビットを実行しており、プロジェクトは .NET 4 です。
Product.wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="CompleteInstall" Language="1033" Version="1.0.0.0" Manufacturer="Technologies" UpgradeCode="b2ae6aa5-263f-4f9a-a250-8599a7f2cb03">
<Package InstallerVersion="200" Compressed="yes" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="CommonDir1" Name="Common Directory 1">
<Directory Id="CommonDir2" Name="Common Directory 2">
<Directory Id="INSTALLFOLDER" Name="Install Directory"/>
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="CompleteInstall" Level="1">
<ComponentGroupRef Id="WcfService_Project" />
</Feature>
<Property Id="WIXUI_INSTALLDIR">INSTALLFOLDER</Property>
<UIRef Id="WixUI_InstallDir" />
</Product>
</Wix>
プロジェクト ファイル:
<Target Name="BeforeBuild">
<MSBuild Projects="%(ProjectReference.FullPath)" Targets="Build" Properties="Configuration=$(Configuration);Platform=x86" Condition="'%(ProjectReference.ContentProject)'=='True'" />
<PropertyGroup>
<LinkerBaseInputPaths>%(ProjectReference.RootDir)%(ProjectReference.Directory)bin\$(Platform)\$(Configuration)\</LinkerBaseInputPaths>
</PropertyGroup>
<HeatDirectory OutputFile="%(ProjectReference.Filename)-temp.xml"
Directory="%(ProjectReference.RootDir)%(ProjectReference.Directory)bin\$(Platform)\$(Configuration)\"
DirectoryRefId="INSTALLFOLDER"
ComponentGroupName="%(ProjectReference.Filename)_Project"
SuppressCom="true"
SuppressFragments="true"
SuppressRegistry="true"
SuppressRootDirectory="true"
AutoGenerateGuids="false"
GenerateGuidsNow="true"
ToolPath="$(WixToolPath)"
Condition="'%(ProjectReference.ContentProject)'=='True'" />
<XslTransformation XmlInputPaths="%(ProjectReference.Filename)-temp.xml"
XslInputPath="XslTransform.xslt"
OutputPaths="%(ProjectReference.Filename).wxs"
Condition="'%(ProjectReference.ContentProject)'=='True'" />
</Target>
WcfService.wxs:
<?xml version="1.0" encoding="utf-8"?><Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="INSTALLFOLDER">
<Component Id="cmpE6EBA3D8D6D4DB0C93E73200C78DCC51" Guid="{C88B5CF9-8807-45DF-AA6F-732437B74BB6}">
<File Id="fil0118BBA61671E80581CA9C9AA6DD3E8D" KeyPath="yes" Source="SourceDir\Some.dll" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="WcfService_Project">
<ComponentRef Id="cmpE6EBA3D8D6D4DB0C93E73200C78DCC51" />
</ComponentGroup>
</Fragment>
</Wix>