I have something like this in my TFSBuild.proj
<ItemGroup>
<SolutionToBuild Include="$(BuildProjectFolderPath)/../../ProjectA/ProjectA.sln" />
<SolutionToBuild Include="$(BuildProjectFolderPath)/../../x64 Installer/x64 Installer.sln" Condition="'$(Platform)' == 'x64' " />
<SolutionToBuild Include="$(BuildProjectFolderPath)/../../x86 Installer/x86 Installer.sln" Condition="'$(Platform)' == 'x86' " />
<ConfigurationToBuild Include="Release|x86">
<FlavorToBuild>Release</FlavorToBuild>
<PlatformToBuild>x86</PlatformToBuild>
</ConfigurationToBuild>
<ConfigurationToBuild Include="Release|x64">
<FlavorToBuild>Release</FlavorToBuild>
<PlatformToBuild>x64</PlatformToBuild>
</ConfigurationToBuild>
</ItemGroup>
I want to override the BeforeCompile target to run a custom task I have written. The custom task will take the output from ProjectA and build file that is used by both installer projects (Wix project files). How to I get the BeforeCompile target to only execute for those two SolutionToBuild items? I assume this is about Target Batching (because I can then use conditions on my task, but I don't get it.
I tried adding something like this to see if it would work, but only the first solution is output to the log:
<Target Name="BeforeCompile" Outputs="%(SolutionToBuild.Identity)">
<Message Text="Solution being built: %(SolutionToBuild.Identity)" />
</Target>