NuGet: 'X' already has a dependency defined for 'Y'
This was resolved by installing the latest NuGet Package Manager:
https://visualstudiogallery.msdn.microsoft.com/4ec1526c-4a8c-4a84-b702-b21a8f5293ca
Don't forget to restart Visual Studio.
I fixed a similar issue in my solution by:
- Opening up a command prompt
- Navigating to the .nuget folder in my solution
- Running
nuget update -self
This upgraded the copy of NuGet.exe
that was in my solution from 2.8.0
to 3.4.4
, which fixed the 'X' already has a dependency defined for 'Y' error that was stopping it from downloading SSH.NET automatically before building.
(If your solution doesn't have a copy of NuGet.exe
in it - and it might not - then you should try the solution in TN's answer instead)