2

The .nuspec File Reference says that files without extensions can be selected in the following manner:

To include files without an extension, use the * or ** wildcards:

<file src="flags\**" target="flags" />

And, then also says that files can be rename in this manner:

<file src="ie\css\style.css" target="Content\css\ie.css" />

How can both this functions be combined to rename LICENSE to AssemblyName.license.txt? I have tried the following without any success:

<files>
    <file src="../LICENSE*" target="./NHibernate.license.txt" />
    -AND-
    <file src="../LICENSE**" target="./NHibernate.license.txt" />
</files>
roydukkey
  • 3,149
  • 2
  • 27
  • 43
  • For the time being, I have bodged this by making a copy of `LICENSE >> LICENSE.txt` before `nuget pack`. Then, deleting the file after the package has been created. – roydukkey Dec 18 '17 at 15:24

1 Answers1

0

You cannot rename files using wildcard. To do what you would like to do, you will need to list out each file individually in the .nuspec file.

<file src="../LICENSE1" target="./1.license.txt" />
<file src="../LICENSE2" target="./2.license.txt" />

If you are frequently adding license files, you may wish to continue making a copy of all files before packing.

techvice
  • 1,315
  • 1
  • 12
  • 24