I think your doing something like this:
<Target Name="DeployNotBatching" >
<Message Text="Deployment to server done here. Deploying to server: %(Customer.Identity)" />
<Message Text="Also called" />
</Target>
Which gives:
Deployment to server done here. Deploying to server: Customer1
Deployment to server done here. Deploying to server: Customer2
Also called
When you really want to do this?
<Target Name="Deploy" Inputs="@(Customer)" Outputs="%(Identity)">
<Message Text="Deployment to server done here. Deploying to server: %(Customer.Identity)" />
<Message Text="Also called" />
</Target>
That results in :
Deploy:
Deployment to server done here. Deploying to server: Customer1
Also called
Deploy:
Deployment to server done here. Deploying to server: Customer2
Also called
So the whole target is iterated rather than the individual command?