Open coleman-c opened 4 years ago
Sorry for the slow response. @pranavkm , looks like an issue with the package. What do you think? The package icon isn't even configured in the nuspec, so it appears with the default icon on nuget.org.
@nkolev92 , how come the client manages to install this package? Shouldn't it fail during unzip?
We're aware of the issue and it's being fixed in our upcoming patch release: https://github.com/aspnet/Extensions/issues/2744. There's also a issue for the NuGet client to flag duplicate items: https://github.com/NuGet/Home/issues/6941
@nkolev92 , how come the client manages to install this package? Shouldn't it fail during unzip? @skofman1
We don't seem to validate that. We have a tracking issue for it on the extraction side. https://github.com/NuGet/Home/issues/8875
@pranavkm correctly linked the issue for the pack side of things.
iisexpress.exe Error: 0 : System.ArgumentException: 已添加项。字典中的关键字:“packageIcon.png”所添加的关键字:“packageIcon.png”
在 System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
在 System.Collections.Hashtable.Add(Object key, Object value)
在 System.Collections.Specialized.OrderedDictionary.Add(Object key, Object value)
在 MS.Internal.IO.Zip.ZipIOCentralDirectoryBlock.ParseRecord(BinaryReader reader, Int64 centralDirectoryOffset, Int32 centralDirectoryCount, Int64 expectedCentralDirectorySize)
在 MS.Internal.IO.Zip.ZipIOCentralDirectoryBlock.SeekableLoad(ZipIOBlockManager blockManager)
在 MS.Internal.IO.Zip.ZipIOBlockManager.get_CentralDirectoryBlock()
在 MS.Internal.IO.Zip.ZipArchive.GetFiles()
在 System.IO.Packaging.ZipPackage.ContentTypeHelper..ctor(ZipArchive zipArchive, IgnoredItemHelper ignoredItemHelper)
在 System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming)
在 System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)
在 System.IO.Packaging.Package.Open(Stream stream)
在 NuGet.PackageHelper.GetManifestStream(Stream packageStream)
在 NuGet.OptimizedZipPackage.EnsureManifest()
在 NuGet.OptimizedZipPackage..ctor(IFileSystem fileSystem, String packagePath, IFileSystem expandedFileSystem)
在 NuGet.Server.Core.PackageFactory.Open(String fullPackagePath)
在 NuGet.Server.Core.Infrastructure.ServerPackageRepository.AddPackagesFromDropFolderWithoutLocking()
在 NuGet.Server.Core.Infrastructure.ServerPackageRepository.
nuget.org should block packages with duplicate files. When the client adds logic to block those, we will take the new bits.
Describe the bug
Adding MS netcore 3.1 packages fails with
System.ArgumentException: Item has already been added.
This is due to 'packageIcon.png' being in the package twice (see screenshot below)I'm not sure where the issue lies, but it is successfully indexed by nuget.org so thought I'd raise it here first.
To Reproduce
Steps to reproduce the behavior:
~/Packages
directoryExpected behavior
The package is indexed
Screenshots
Renaming the nupkg as a zip and inspecting illustrates the issue:
Additional context
The same appears true with a variety of other 3.1 packages I've looked at.