8

No matter which framework version I use (tried with 3.5, 4 and 4.5).

I always get a message which says 'SSH.NET' already has a defined dependency on 'SshNet.Security.Cryptography'. But if I try to install 'SshNet.Security.Cryptography', I get another message which says it already has a defined dependency for 'System.IO', and so on...

I've tried through the nuget packet manager and the nuget command line as well.

Any clue on what's happening? Regards

Flacid_Snake
  • 391
  • 2
  • 5
  • 16
  • Where exactly are you seeing this error message? – Lars Kristensen Sep 08 '16 at 07:52
  • That's the output for both nuget packet manager and nuget command line – Flacid_Snake Sep 08 '16 at 08:08
  • Can you include a screenshot? I'm asking because I can't figure out how or why this is displayed, and searching google for the term **"already has a defined dependency"** only brings up this question as a result. – Lars Kristensen Sep 08 '16 at 08:15
  • I've uploaded a picture with the error: https://postimg.org/image/iyj30ixvz/ – Flacid_Snake Sep 08 '16 at 08:59
  • It seems this is an error in Nuget Package Manager. The answer to [this question](http://stackoverflow.com/a/23321316/717088) suggests updating Nuget Package Manager for VS2012, then restarting Visual Studio, and then try to install the package again. – Lars Kristensen Sep 08 '16 at 09:10
  • On a side note, I couldn't find the error-message to begin with, because of the translation of the error. In the future, please include the actual error message as you see it. Alternatively, you could also ask on the [Spanish version of StackOverflow](http://es.stackoverflow.com/). – Lars Kristensen Sep 08 '16 at 09:17
  • I already have the latest version of Nuget (sorry about the language of the picture). – Flacid_Snake Sep 08 '16 at 09:31

4 Answers4

7

according to https://github.com/sshnet/SSH.NET/issues/82

Seems like I can just download the NuGet package directly from https://www.nuget.org/packages/SSH.NET/ by clicking on "Download" (of course).

Then, extract the package and pick the dll I need according to the .NET framework version I'm using.

Thanks to everyone! :)

Flacid_Snake
  • 391
  • 2
  • 5
  • 16
1

I had a similar problem in VS 2013. I upgraded the NuGet Package Manager to version 2.12 and was then able to install SSH.Net version 2016.1.0 .

Dror
  • 1,406
  • 12
  • 15
0

I get the same issue in Visual Studio Ultimate 2012 even though I have installed the latest update and upgrade the NuGet Package Manager to latest version 2.8.60318.667 in Visual Studio 2012. Then I try install this package in Visual Studio 2013 where the NuGet Package Manager version is 2.8.60610.756. The Package of SSH.NET installed successful.

So I’m afraid that there has some issue between current version of SSH.NET package and NuGet Package Manager version 2.8.60318.667. But this problem has been resolved in Visual Studio 2013, I suggest you upgrade your Visual Studio to higher version.

Another way for your issue is that you could install previous version of SSH.NET package in Visual Studio 2012. I have checked the SSH.NET 2016.0.0-beta2 version, it could install successful in Visual Studio 2012.

Weiwei
  • 3,674
  • 1
  • 10
  • 13
0

I have found the solution for this.

First Install NuGet Package Manager in Visual Studio

Package Manager installation for Visual Studio 2010 and earlier

  1. In Visual Studio, click Tools > Extension and Updates.
  2. Navigate to Online, search for "NuGet Package Manager for Visual Studio," and click Download.
  3. In the Installer dialog box, click Install.
  4. When installation is complete, restart Visual Studio.

Then install SHH.NET using NuGet Package Manager by doing the following:

  1. In Solution Explorer, right-click References (or Bin in a Website project), or the desired project, and select Manage NuGet Packages...
  2. Search for SHH.NET
  3. Then click Install