New .csproj format - How to specify entire directory as “linked file” to a subdirectory?

后端 未结 2 1603
青春惊慌失措
青春惊慌失措 2020-12-10 02:35

With the new .csproj format (as well as the old), it is possible to add files as linked outside of the project folder:

 

        
2条回答
  •  不知归路
    2020-12-10 03:00

    While this was previously possible using the %(RecursiveDir) metadata when using glob expansion ( Link="Resources\%(RecursiveDir)%(Filename)%(Extension)"), the 2.0.0 version of the .NET Core SDK allows the use of a new LinkBase metadata:

    
    

    Note that you need to install the 2.0.0 in addition to the recently released VS 2017 15.3 (and ensure no global.json selects a lower version).

    It was introduced with this pull request which is probably the best documentation at the moment.

提交回复
热议问题