Ravi
Ravi

Reputation: 225

Error using Renci SshNet in Xamarin.iOS project

Am getting the error MT2002: Failed to resolve "System.Diagnostics.TraceSource" reference from "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" while accessing the Renci.SshNet.SftpClient as part of my Xamarin project. How can I resolve this issue?

Thanks, Ravi Kumar

Upvotes: 0

Views: 690

Answers (2)

Ravi
Ravi

Reputation: 225

We resolved this issue by referring the native ssh library(https://github.com/Lejdborg/NMSSH) for Objective-c and creating a binding project to refer it in Xamarin.iOS code base.

Upvotes: 0

poupou
poupou

Reputation: 43553

You need to use assemblies that were either:

  • compiled against the SDK/BCL that ships with Xamarin.iOS.dll, that's a subset of the .NET 4.5 framework (that we call the mobile profile) that is optimized for smaller devices;

or

  • compiled against of the the PCL profiles that is compatible with Xamarin.iOS;

If you use (like above) assemblies that were compiled against the desktop framework (either Mono and MS.NET) then you risk using types/members that are not part of the mobile profile.

Upvotes: 0

Related Questions