When a new package is added to the dependencies of a packaging project using the NuGet UI or PS tools, or when a package is updated via the same mechanism, the reference in the packaging project is set to CopyLocal=true.
This causes the DLL to be copied to the Packages folder on build, and hence be included in the generated package (not expected behavior).
An additional pre-build step is required to set CopyLocal=false for any DLL referenced by the Packaging project that is referenced out of the solution's packages folder. This will prevent extraneous DLLs being added to the package (and remove the manual fix-up that is currently needed).
When a new package is added to the dependencies of a packaging project using the NuGet UI or PS tools, or when a package is updated via the same mechanism, the reference in the packaging project is set to CopyLocal=true.
This causes the DLL to be copied to the Packages folder on build, and hence be included in the generated package (not expected behavior).
An additional pre-build step is required to set CopyLocal=false for any DLL referenced by the Packaging project that is referenced out of the solution's packages folder. This will prevent extraneous DLLs being added to the package (and remove the manual fix-up that is currently needed).