title: Sharp.XMPP with Xamarin Forms
body: <p>I am using Xamarin forms to create a chat application and to achieve that i am using Sharp.XMPP library from Nuget but i ran into issues. </p>
  
  <p>It was stated that it doesn't support in PCL at <a href="https://stackoverflow.com/questions/32396159/xamarin-forms-portable-class-library-project-with-sharp-xmpp-library">here</a></p>
  
  <p>So i converted the project into shared .net standard library following this <a href="https://blog.xamarin.com/building-xamarin-forms-apps-net-standard/" rel="nofollow noreferrer">blog</a></p>
  
  <p>After adding following code </p>
  
  <pre><code>    using Sharp.Xmpp.Client;
  
  
      async void OnLoginButtonClicked(object sender, EventArgs e)
      {
          var user = new User
          {
              Username = usernameEntry.Text,
              Password = passwordEntry.Text
          };
  
          string hostname = "localhost";
          string username = user.Username;
          string password = user.Password;
  
          using (var client = new XmppClient(hostname, username, password))
          {
              client.Connect();
              messageLabel.Text = "Login Success";
              client.SendMessage("axcl@localhost", "juyugygyg");
          }
      }
  </code></pre>
  
  <p>Error Recieved : </p>
  
  <pre><code>    Severity    Code    Description Project File    Line    Suppression State
      Error       Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Sharp.Xmpp, Version=1.0.2.2, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
      File name: 'Sharp.Xmpp.dll'
         at Java.Int        rop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
         at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
         at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver)   app.Android         
  </code></pre>
  
  <p>Can anyone help me out to how to bind a .net library dll into the project so that it can be used in xamarin forms. </p>
  
  <p>Another alternative is agsXMPP .NET SDK but am not sure much of it.</p>
  
  <p>If i missed something. Sorry for that</p>