Why does MSBuild not execute multiple targets?

msbuild, teamcity

Solution

You need to tell MSBuild about your multiple targets

Try

<Target Name="Build" DependsOnTargets="T1; T2">
</Target>

Problem

I have set up multiple targets in a single xml file. I expect all targets to run but only the frist target gets executed. Here is a simplified version of what iam trying to do: ``` <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="T1"> <Copy SourceFiles="c:\temp\a.txt" DestinationFolder="C:\temp2\" /> </Target> <Target Name="T2"> <Copy SourceFiles="c:\temp\b.txt" DestinationFolder="C:\temp2\" /> </Target> </Project> ``` I'am running the build from the TeamCity CI Server and the logs reports Process exit code: 0. Anyone got any ideas why it does not run T2?

Original source