Can I specify the output path for the MSBuild tag?

后端 未结 4 2016
猫巷女王i
猫巷女王i 2021-02-07 08:29

Is it possible to specify a different folder for the output of the following file?


  PreserveNe         


        
4条回答
  •  心在旅途
    2021-02-07 09:07

    A different output folder can be specified by using the Link metadata on None/Content items:

    
      some\folder\%(Filename)%(Extension)
      PreserveNewest
    
    

    When using wildcards in an include statement, this is also the way to preserve the directory hierarchy, even for files coming from outside the project directory:

    
      some\folder\%(RecursiveDir)%(Filename)%(Extension)
      PreserveNewest
    
    

    In SDK-based projects (default for ASP.NET Core / .NET Core / .NET Standard projects) using a 2.0.0+ SDK, the same can be achieved using the LinkBase metadata:

    
    

提交回复
热议问题