Obtain output files from a MSBuild project

后端 未结 4 1705
一个人的身影
一个人的身影 2020-12-31 04:20

Is it possible to obtain a list all all the output files from a MSBuild project?

In a simple project, I could do something like



        
4条回答
  •  情歌与酒
    2020-12-31 05:00

    If you are using the MSBuild task then you can get the files that were built by using the TargetOutputs output. Here is an example

    
          
    
    

    So in this case when YourProject.csproj is built the files that were created would be placed inside the YourProjectOutputs item.

    I've created a blog entry a while ago that talks in more detail about this, MSBuild: How to Get All Generated Outputs.

    Sayed Ibrahim Hashimi

    My Book: Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build

提交回复
热议问题