Edit

NuGet Error NU5050

Attempted to pack multiple files into the same location(s). The following destinations were used multiple times: content\readme.txt

Issue

Multiple files have the same destination path inside your package. NuGet can't create a package with duplicate file paths.

For example, the following .nuspec entries both place a file at content\readme.txt:

<files>
  <file src="first\readme.txt" target="content\" />
  <file src="second\readme.txt" target="content\" />
</files>

Solution

Remove duplicate file entries, or change their destination paths so that each file has a unique path inside the package. If you use wildcard patterns to include files, check for overlapping matches.

For a .nuspec file, update the target or exclude attributes of the file elements. For project pack, update the PackagePath metadata or set Pack="false" on items you don't want to include. For more information, see Including content in a package.