Modify MSBuild ItemGroup Metadata

前端 未结 6 478
渐次进展
渐次进展 2020-12-09 08:46

Is it possible to modify a ItemGroup\'s metadata after it is declared.

For Example:

  
    

        
6条回答
  •  心在旅途
    2020-12-09 09:26

    I tried using the UpdateMetaData TaskAction from the MSBuildHelper task in the 4.0 extensions pack but it didn't do what I expected so I went with the remove/replace method. In this example I'm trying to update the DestinationRelativePath metadata property in the FilesForPackagingFromProject item group.

        
    
        
            
                $(CopyAllFilesToSingleFolderForPackageDependsOn);
                SetFilePathsToRoot;
            
        
    
        
    
            
    
            
            
                
                    %(FileName)%(Extension)
                
            
    
            
                
                
            
    
        
    
    
    

提交回复
热议问题