NuSpec files tag doesn't always disable convention based file contents?

Topics: General
Jun 17, 2014 at 6:21 PM
The documentation ( and comments ( say that if you include a files section in your NuSpec, then convention based file inclusion is turned off.

That is just what I want to have happen. And, if I do a nuget pack of the nuspec file, that's what I get. But, if I do a nuget pack of the project file, then the convention based files (which I don't want) are being included.

Is that the expected behavior?

If it is, then I'd suggest that the documentation could make that clearer. (And, yes, I'd be willing to submit a change, if wiser folks here help me craft what it should say.)

On the other hand, it would be nice to be able to do a nuget pack of the project file and have a way to say "but only include the files identified in the <files> section", so that you can take advantage of token replacement, and/or automatic dependency discovery, etc.

Is there a way to do that?