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?
- Should I create an separate PCL, call it "Proxy" and then just use this PCL in Xamarin.iOS, Android and Windows Mobile projects?
- If 1), should I add SignalR also in every project (besides PCL, where I'm really using it)?
- Should I add to the PCL created by default, while creating Xamarin.Forms solution?
Thanks for help,
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:
var connection = new HubConnection("http://localhost:52128");
it doesn't even compile. I'm getting errors:
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
I'm totally lost.
I've tried:
Installing nuget just on the PCL - error
Installing on every project - error
Creating new PCL, implementing that line there, adding it as a reference to the main PCL. Calling a method from the second PCL - error.