0

While pushing my own .nupkg file to my private nuget repository, I encountered HTTP 500. Upon inspecting in Fiddler, I found this error message along the line of 'X' already has a dependency defined for 'Y'.

This is similar to this other question, but instead of happening during nuget add, this one happens upon nuget push. I did make sure that my nuget.exe locally is on version 4+.

Aditya Santoso
  • 1,031
  • 6
  • 19

1 Answers1

1

Turns out that this is caused by the .nupkg that I'm trying to push having .NET Core dependencies defined along with .NET Framework dependencies. This is incompatible with older version of nuget server that was running in my private repository.

Similar to the problem happening on the nuget add, I have to ensure that my private nuget server is updated to a version that supports .NET Core dependencies. In my case, I updated the Nuget.Server to 3.1.4

Bear in mind that updating the NuGet.Server also mutates the Web.config which might cause the server failing to start with HTTP 500. To resolve, I also had to remove the extraneous duplicate <compilation> and <apikey> element as explained here.

Aditya Santoso
  • 1,031
  • 6
  • 19