Double-Loop in msbuild?

前端 未结 4 743
暗喜
暗喜 2021-02-07 18:04

I\'m writing a script for msbuild which should make two batches in one step.
Example: 2 ItemGroups


 
 

        
4条回答
  •  梦如初夏
    2021-02-07 18:53

    This is a much simpler solution.

    
        
            
                %(GroupTwo.Identity)
            
        
    
        
    
    

    Using an intermediate Item group Combined to create an intermediate item group that the Message task batches on.

    If you reference two Item groups in the same task, Msbuild will batch on them both separately. which is NOT what you want

    If you have more ItemMetaData you'll need to handle that explicitly for the second ItemGroup, The ItemGroup included with the reference symbol @ automatically includes the ItemMetaData, so you'll just need to create the additional MetaData from the second group by referencing explicitly. Here's an example:

    
        
            One
        
        
            Two
        
    
    
    
        
            Andrew
        
        
            Bob
        
    
    
    
        
            
                %(GroupTwo.Identity)
                %(GroupTwo.Name)
            
        
    
        
    
    

提交回复
热议问题