By convention, you do not have to explicitly specify a list of files in the
.nuspec file. In some cases, however, it may be useful to explicitly list the files in your project that should be included in the NuGet package. Do note that if you specify any files, the conventions are ignored, and only the files listed in the package manifest are included in the package.
files element is an optional child element of the
package element and contains a set of
file elements. Each
file element specifies the source and destination of a file to include in the package via the
src attribute and
target attribute, respectively.
Table A-4 lists the possible attributes of the