In most projects where separate projects live in separate folders, this is not a problem as NuGet identifies the packages.config files in each project. With NuGet 3.3+ and multiple projects in the same folder, you can insert the name of the project into the packages.config filenames use the pattern packages.{project-name}.config, and NuGet uses that file.
This is not an issue when using PackageReference, as each project file contains its own list of dependencies.