Skip to content

Unable to build the project after adding this nuget package #62

@blueelvis

Description

@blueelvis

Hi!

I am getting the following error saying that the key has already been added. Please find the logs below -

Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB4018	The "PackageRetrievalTask" task failed unexpectedly.
System.ArgumentException: Item has already been added. Key in dictionary: 'packageIcon.png'  Key being added: 'packageIcon.png'
   at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at System.Collections.Hashtable.Add(Object key, Object value)
   at System.Collections.Specialized.OrderedDictionary.Add(Object key, Object value)
   at MS.Internal.IO.Zip.ZipIOCentralDirectoryBlock.ParseRecord(BinaryReader reader, Int64 centralDirectoryOffset, Int32 centralDirectoryCount, Int64 expectedCentralDirectorySize)
   at MS.Internal.IO.Zip.ZipIOCentralDirectoryBlock.SeekableLoad(ZipIOBlockManager blockManager)
   at MS.Internal.IO.Zip.ZipIOBlockManager.get_CentralDirectoryBlock()
   at MS.Internal.IO.Zip.ZipArchive.GetFiles()
   at System.IO.Packaging.ZipPackage.ContentTypeHelper..ctor(ZipArchive zipArchive, IgnoredItemHelper ignoredItemHelper)
   at System.IO.Packaging.ZipPackage..ctor(String path, FileMode mode, FileAccess access, FileShare share, Boolean streaming)
   at System.IO.Packaging.Package.Open(String path, FileMode packageMode, FileAccess packageAccess, FileShare packageShare, Boolean streaming)
   at Baseclass.Contrib.Nuget.Output.Build.NugetPackageManager.TryGetUsedPackagesDependendingOnNugetOutput(ITaskItem[]& packages)
   at Baseclass.Contrib.Nuget.Output.Build.PackageRetrievalTask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()	CP	C:\Users\User\.nuget\packages\baseclass.contrib.nuget.output\2.4.3\build\Baseclass.Contrib.Nuget.Output.targets	65	

Any idea what might be the issue?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions