How to include directories recursively in NuSpec file

和自甴很熟 提交于 2019-12-18 12:17:54

问题


I have a folder structure like this in my project...

Project/Folder1/Folder2
-File1
-File2
-File3

Project/Folder1/Folder3
-File4
-File5
-File6

Project/Folder1/Folder4
-File7
-File8

In a NuSpec definition file, how can I tell it to include everything under Folder1 (folders and files recursively)?

Can I just do this or do I need a double ** or what?

<file src="Project\Folder1\*.*" target="Project/Folder1" />

回答1:


You can use the wildcard ** which is documented on the NuGet web site. From the NuGet docs:

Using a double wildcard, **, implies a recursive directory search.

<file src="tools\**\*.*" exclude="**\*.log" />
<file src="lib\**" target="lib" />


来源:https://stackoverflow.com/questions/24249854/how-to-include-directories-recursively-in-nuspec-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!