3

I'm new to both Xamarin and SignalR. While I'm able to easily follow the tutorials for SignalR on Visual Studio, and get a sample chat application working, I'm not able to make it work on Xamarin. I tried to reference the signalr assemblies in Xamarin, but it fails with the following error -

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Security, Version=4.0.0.0, Culture=neutral

But I'm not able to find System.Security to add to references.

Am I doing this right?

I also tried looking for SignalR in Components. But couldn't find it.

Also, I tried to find some tutorials on SignalR in Xamarin that would guide me through this process. But I wasn't able to find any. Can someone point me to some blogs/tutorials that can help me setup SignalR in Xamarin?

Thanks!

4

2 回答 2

1

这些步骤对我有用:

  1. 在 Xamarin 上安装了 beta 更新
  2. 在 signalr 上获得 dev 分支并构建它以包含单声道支持
  3. 删除了对 signalr.core 程序集的引用(这是一个引用 system.security)
于 2013-07-05T22:49:52.947 回答
0

如果您使用 Xamarin.Forms Net 标准 ( https://blog.xamarin.com/building-xamarin-forms-apps-net-standard/ ),只需安装 nuget ' Microsoft.AspNet.SignalR.Client' 并使用 microsoft 为 NET 客户端提供的所有示例代码( https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-net-client ) 到您的共享代码中。

于 2018-07-18T06:53:16.460 回答