contentprojが単なるファイルのコレクションであると仮定すると、インストーラーを作成しているwixproj内に直接ハーベスティングを追加することができます。
<PropertyGroup>
<HarvestDirectoryNoLogo>true</HarvestDirectoryNoLogo>
<HarvestDirectorySuppressFragments>true</HarvestDirectorySuppressFragments>
<HarvestDirectorySuppressUniqueIds>true</HarvestDirectorySuppressUniqueIds>
<HarvestDirectoryAutogenerateGuids>true</HarvestDirectoryAutogenerateGuids>
</PropertyGroup>
<ItemGroup>
<HarvestDirectory Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "
Include="$(SolutionDir)\GameContent">
<DirectoryRefId>INSTALLDIR</DirectoryRefId>
<SuppressRootDirectory>true</SuppressRootDirectory>
<PreprocessorVariable>var.GameContentDir</PreprocessorVariable>
<ComponentGroupName>GameContent</ComponentGroupName>
</HarvestDirectory>
</ItemGroup>
これをwixprojファイルに手動で追加する必要があります。複数のディレクトリが必要な場合は、ディレクトリごとにHarvestDirectoryを繰り返すことができます。
var.GameContentDir
プリプロセッサ変数を設定するには、DefineConstantsプロパティを編集します。
<DefineConstants>GameContentDir=$(GameContentDir);</DefineConstants>
これにより、プリプロセッサ変数がmsbuildプロパティに設定されます。
<GameContentDir>$(SolutionDir)\GameContent</GameContentDir>
つまり、ビルド構成に応じてこれを変更できます。パスを変更する必要がない場合は、<DefineConstants>
プロパティに静的な値を設定するだけです。
これにより、各ビルドのobjディレクトリにwxsファイルが生成されます。このファイルは、ComponentGroupNameが含まれていると想定して含まれます。以前に生成したものをwixprojに含めた場合は、ComponentGroupNameが同じであると競合が発生するため、それを削除してください。