title: SingalR in Xamarin.Forms
body: <p>I'm trying to create a Xamarin.Forms PCL client for SignalR. Every tutorial I found it's how to add SignalR to either Xamarin.Android or Xamarin.iOS. How can I add SignalR to Xamarin.Forms project? </p>
  
  <ol>
  <li>Should I create an separate PCL, call it "Proxy" and then just use this PCL in Xamarin.iOS, Android and Windows Mobile projects?</li>
  <li>If 1), should I add SignalR also in every project (besides PCL, where I'm really using it)?</li>
  <li>Should I add to the PCL created by default, while creating Xamarin.Forms solution?</li>
  </ol>
  
  <p>Thanks for help,</p>
  
  <p>Here's the problem I'm getting:
  I have a fully working Xamarin.Forms PCL project. I removed all windows stuff though. I just left PCL, iOS and Android projects. It works! I added CocosSharp only, but don't use it. Plain, empty, never touched Xamarin.Forms. Then I've added SingalR to PCL project. Complied, run - works! BUT when I add JUST this line:</p>
  
  <pre><code>var connection = new HubConnection("http://localhost:52128");   
  </code></pre>
  
  <p>it doesn't even compile. I'm getting errors:</p>
  
  <blockquote>
    <p>Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Perhaps it doesn't exist in the Mono for Android profile</p>
  </blockquote>
  
  <p>I'm totally lost.</p>
  
  <p>I've tried:</p>
  
  <ol>
  <li><p>Installing nuget just on the PCL - error</p></li>
  <li><p>Installing on every project - error</p></li>
  <li><p>Creating new PCL, implementing that line there, adding it as a reference to the main PCL. Calling a method from the second PCL - error.</p></li>
  </ol>