How to include directories recursively in NuSpec f

2020-02-25 04:33发布

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条回答
聊天终结者
2楼-- · 2020-02-25 05:25

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" />
查看更多
登录 后发表回答