question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet build (1.0.0-rc2-002543) - An item with the same key has already been added. Key: System.IO.Compression

See original GitHub issue

Steps to reproduce

Clone https://github.com/Humanizr/Humanizer.git and checkout the dev branch. Checkout this commit: https://github.com/Humanizr/Humanizer/commit/c42e2cd03356824e7a68f93753c22c01143393ac go to src\Humanizer and run restore on Humanizer and Humanizer.Tests.Dotnet in src\Humanizer.Tests.DotNet, run dotnet build

Expected behavior

Build should succeed.

Actual behavior

Build fails with An item with the same key has already been added. Key: System.IO.Compression

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-rc2-002543)

Product Information: Version: 1.0.0-rc2-002543 Commit Sha: 38d0c28a1e

Runtime Environment: OS Name: Windows OS Version: 10.0.14332 OS Platform: Windows RID: win10-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:26 (26 by maintainers)

github_iconTop GitHub Comments

2reactions
brthorcommented, May 2, 2016

Okay, it’s looking like we’ll need to debug.

cc @piotrpMSFT This seems pretty weird, I think we should consider this for RC2.

0reactions
clairernovotnycommented, May 6, 2016

Might this have something to do with xproj -> csproj refs?

 "Humanizer/2.1.0": {
      "type": "project",
      "path": "../Humanizer/project.json"
    },
    "Humanizer.DotNet/2.1.0": {
      "type": "project",
      "path": "../Humanizer/project.json",
      "msbuildProject": "../Humanizer/Humanizer.DotNet.xproj"
    }

This is wrong. Humanizer.DotNet.xproj uses project.json. The csproj Humanizer uses Humanizer.project.json and both should not be picked up here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An item with the same key has already been added
Most likely, you have model which contains the same property twice. Perhaps you are using new to hide the base property.
Read more >
An item with the same key has already been added
I always receive this error "An item with the same key has already been added." when I try to start a pipeline release...
Read more >
Unknown build error, 'An item with the same key has already ...
I got this error today when trying to build a C# solution today. In my case the error was caused by the fact...
Read more >
ZipFile Class (System.IO.Compression)
Provides static methods for creating, extracting, and opening zip archives. ... NET Framework app, you must add a reference to the System.IO.Compression.
Read more >
Why I get "an item with the same key has already been ...
I deployed my new bilingual ASP.NET Core website as Azure WebApp. Currently i'm getting from time to time: Expand ▽.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found