Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What values can the MSBuild output TaskParameter take?

Tags:

msbuild

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?

like image 800
Tomas Aschan Avatar asked Apr 16 '26 09:04

Tomas Aschan


1 Answers

When using the <Output /> targets output, valid values for the TaskParameter property 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 true for every referenced assembly you want to receive in Binaries (via TargetOutputs).

like image 169
Filburt Avatar answered Apr 22 '26 20:04

Filburt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!