MSBuild to copy dynamically generated files as part of project dependency

前端 未结 5 1928
青春惊慌失措
青春惊慌失措 2020-12-01 14:40

I have a custom msbuild task that is generating some output files to the output directory ($(TargetDir)) of a ProjectA. Current code is something like this:

         


        
5条回答
  •  不思量自难忘°
    2020-12-01 15:11

    As I understand you want to add additional step by writing only this line in ProjectB.msbuild:

    
    

    To achieve it you can write something like in ProjectA:

    
      $(BuildDependsOn);MyCustomTask
    
    

    This adds your task to the list of dependencies of Build task.

    Refer this question for details: StyleCop MS Build magic? Who is calling the StyleCop target?

提交回复
热议问题