24

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" />
4

1 回答 1

51

您可以使用NuGet 网站上记录的通配符 ** 。从 NuGet 文档:

使用双通配符 ** 表示递归目录搜索。

<file src="tools\**\*.*" exclude="**\*.log" />
<file src="lib\**" target="lib" />
于 2014-06-16T19:08:35.813 回答