首页 > 解决方案 > 发现异常方法未找到:iOS 上的 Microsoft.AspNetCore.Http.Connections.NegotiationResponse

问题描述

该代码似乎适用于Xamarin.Forms中的UWP ,但是当我在iOS上尝试此操作时,出现以下错误

发现异常方法未找到:Microsoft.AspNetCore.Http.Connections.NegotiationResponse Microsoft.AspNetCore.Http.Connections.NegotiateProtocol.ParseResponse

是否需要在iOS中进行更新才能使其正常工作?

我正在使用Microsoft.AspNetcore.SignalrClient v 5.0.4

这在以前的版本中有效,有什么想法吗?

标签: iosxamarin.formssignalr

解决方案


您可能会在这里找到解决方法:

https://github.com/mono/mono/issues/20805#issuecomment-841321110

基本上解决方案是修改 iOS.csproj 文件以包含

    <PackageReference Include="System.Buffers">
      <Version>4.5.1</Version>
      <IncludeAssets>none</IncludeAssets>      
    </PackageReference>
    <PackageReference Include="System.Memory">
      <Version>4.5.4</Version>
      <IncludeAssets>none</IncludeAssets>      
    </PackageReference>

就像在这个提交中一样

在此处输入图像描述


推荐阅读