Installing packages

0

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

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

I tried to install via NuGet and I can not say. It is not compatible with a PCL project.

  

The 'System.Net.Sockets 4.3.0' package could not be installed. You   you are trying to install this package on a project that is intended to   '.NETPortable, Version = v4.5, Profile = Profile111', but the package does not   contains no assembly or content file reference that is   compatible with this structure. For more information,   contact the package author.

How do I resolve this? I need these DLLs because there are references to them in the project.

    
asked by anonymous 03.01.2018 / 16:21

1 answer

0

If the class has changed design, you should change the using , noting if the projects that will use the class have reference to the project it is written in, and also look at the class namespace and if it is accessible externally (public). It looks something like this: using NomeProjeto.NameSpace or directly NomeProjeto.NameSpace.Classe.Metodo

    
03.01.2018 / 17:02