dotnet core publish: include/exclude dir in output

后端 未结 1 1540
执笔经年
执笔经年 2020-12-17 22:58

Given aspnet project with folders:

/
  /sql
  /WebApp
    /Client
    /wwwroot
    /Views

On project.json I used

\"publishO         


        
1条回答
  •  粉色の甜心
    2020-12-18 00:00

    Update:

    When using VS 2017 >= 15.3 or a .NET CLI version >= 2.0, there is a new feature that automatically adds Link metadata for a few known item types (including Content). This can be used like:

    
    

    Original:

    You can use this:

      
        
        
      
    

    The content include item's link metadata is a bit of hack to make MSBuild use the item's relative path as target path. This is because items outside of the "project cone" aren't considered in AssignTargetPath if they have no Link metadata (source).

    Alternative to you can also do this to still have the files inside VS:

    
    

    0 讨论(0)
提交回复
热议问题