How can I use MSBuild Copy Task to Copy To Multiple Destination Folders?

前端 未结 2 1361
伪装坚强ぢ
伪装坚强ぢ 2021-02-02 14:18

I\'m trying to copy a folder recursively to multiple destination folders using MSBuild\'s Copy task. I\'ve seen the following question which gave me a good sta

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-02 14:57

    The most important missing piece in the puzzle seems to be the Outputs attribute on the Target element without which you'll always only execute the target for one item of the whole list. The other piece is the new property you need to define on the way.

    The solution to your problem might look like so:

    
        
        
    
    
    
        
            %(DeployPath.Identity)
        
        
        
    
    

提交回复
热议问题