I'm building a NuGet package in a build step in Jenkins (although Jenkins is probably unrelated).
I'm running NuGet command line like this:
NuGet Pack MyProject.csproj
There is also a MyProject.nuspec file in the same folder, I'm using a few variables like $id$, $version$, etc.
My nuspec only has a few files such as this:
<files>
<file src="..\..\Build\MyProject.dll" target="lib\net40\MyProject.dll" />
<file src="..\..\Build\MyProject.pdb" target="lib\net40\MyProject.pdb" />
<file src="..\..\Build\MyProject.XML" target="lib\net40\MyProject.XML" />
</files>
My issue is that when there I inspect the built nupkg contents with 7zip, I notice there are additional files (dlls, pdb, xml, etc.) that happen to be in the Build folder I am pulling my files from.
These files are present from a previous build step, and will eventually be used in other NuGet packages (but I don't want them included in this main package).
What would cause NuGet to put extra files in the nupkg?