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

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

问题描述

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

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

项目/文件夹1/文件夹2
-File1
-File2
-File3

Project/Folder1/Folder2
-File1
-File2
-File3

项目/文件夹1/文件夹3
-File4
-File5
-File6

Project/Folder1/Folder3
-File4
-File5
-File6

项目/文件夹1/文件夹4
-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="ProjectFolder1*.*" 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天全站免登陆