Package installation

Asked

Viewed 72 times

0

I needed to copy an entire class into my PCL project (Xamrin.Forms). And it’s giving error on three using which are:

using System.Web; using System.Net.Sockets; using System.Security.Cryptography;

I tried to install via Nuget and I’m not getting it. It says not compatible with a PCL project

Unable to install 'System.Net.Sockets 4.3.0' package. is trying to install this package in a project that is intended for '. Netportable,Version=v4.5,Profile=Profile111', but package not contains no reference to Assembly or content file that is compatible with this structure. For more information, please visit contact the package author.

How do I fix this? I need these DLL’s as there are references to them in the project.

1 answer

0

If the class has changed project, you must change the using, observing if the projects that will use the class have reference to the project in which it is written, and also observe the class namespace and if it is accessible externally (public). It goes something like this: using NomeProjeto.NameSpace or directly NomeProjeto.NameSpace.Classe.Metodo

Browser other questions tagged

You are not signed in. Login or sign up in order to post.