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" />
A . nuspec file is an XML manifest that contains package metadata. This manifest is used both to build the package and to provide information to consumers. The manifest is always included in a package.
It means it will also recurse into subdirectories and add those files.
A NUSpec file contains package metadata and is used to create a package. A package is created from your project, which is why it would make sense to place the NUSpec file in the project folder.
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" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With