如何在NuSpec文件中递归包含目录 [英] How to include directories recursively in NuSpec file

查看:94
本文介绍了如何在NuSpec文件中递归包含目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目中有这样的文件夹结构...

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

项目/文件夹1/文件夹2
-文件1
-文件2
-文件3

Project/Folder1/Folder2
-File1
-File2
-File3

Project/Folder1/Folder3
-文件4
-文件5
-文件6

Project/Folder1/Folder3
-File4
-File5
-File6

Project/Folder1/Folder4
-File7
-File8

Project/Folder1/Folder4
-File7
-File8

在NuSpec定义文件中,如何告诉它在Folder1下包含所有内容(递归的文件夹和文件)?

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

推荐答案

您可以使用通配符**,它是记录在NuGet网站上.来自NuGet文档:

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

这篇关于如何在NuSpec文件中递归包含目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆