In an MSBuild script, I have the following:
<Target Name="CompileCode">
<MSBuild Projects="$(SolutionPath)" Targets="Build" Properties="...">
<Output TaskParameter="TargetOutputs" ItemName="Binaries" />
</MSBuild>
</Target>
The output of this target will be a collection Binaries which contains all the assemblies from my project. I’d like to include all assemblies, including external libraries that I’ve referenced (such as NUnit or Castle.Core). For that, I Imagine there is another value I should set for the TaskParameter – but which one?
I’d like to know of all the available options here, not just the ones that applies to my specific case – there are other things in this build script that might be eaiser (or even no longer impossible) if I know all my options…
So, what can I put in the TaskParameter property?
When using the
<Output />targets output, valid values for theTaskParameterproperty would be any readable parameter of the<MSBuild />task.The solution for your problem at hand will be to ensure that the projects in your solution specify to copy all referenced assemblies, i.e. the property CopyLocal is set to
truefor every referenced assembly you want to receive inBinaries(via TargetOutputs).