调试 Xamarin Form SignalR 客户端 C# 时出现警告消息 "There was a conflict"
Warning Message "There was a conflict" when debugging Xamarin Form SignalR Client C#
每当我调试我的 Xamarin 表单(移动、C#、SignalR.Client)时,下面的消息总是弹出。这是我的客户端无法连接到 Asp.Net Core 中的集线器的原因吗?我的集线器无法正常工作。我一直在我的代码中发现错误,但这是我在我的代码中发现的唯一错误。我该如何解决这个问题?
Message:
Severity Code Description Project File Line Suppression State
Warning Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.
There was a conflict between "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
"System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
References which depend on "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [D:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll].
D:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll
Project file item includes which caused reference "D:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll".
System.Numerics.Vectors
References which depend on "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
C:\Users\Lenovo\.nuget\packages\system.text.json.0.0-preview.7.21377.19\lib\netstandard2.0\System.Text.Json.dll
Project file item includes which caused reference "C:\Users\Lenovo\.nuget\packages\system.text.json.0.0-preview.7.21377.19\lib\netstandard2.0\System.Text.Json.dll".
C:\Users\Lenovo\.nuget\packages\system.text.json.0.0-preview.7.21377.19\lib\netstandard2.0\System.Text.Json.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.http.connections.common.0.0-preview.7.21378.6\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Common.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.http.connections.client.0.0-preview.7.21378.6\lib\netstandard2.1\Microsoft.AspNetCore.Http.Connections.Client.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.signalr.client.0.0-preview.7.21378.6\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.dll
C:\Users\Lenovo\source\repos\App21\App21\App21\bin\Debug\netstandard2.0\App21.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.signalr.common.0.0-preview.7.21378.6\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Common.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.signalr.client.core.0.0-preview.7.21378.6\lib\netstandard2.1\Microsoft.AspNetCore.SignalR.Client.Core.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.signalr.protocols.json.0.0-preview.7.21378.6\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.Json.dll App21.Android
.Net 6还没有发布,所以容易出错。此外,VS2022(预览版 3)更适合调试此问题,因为已创建环境以使用 .Net 6 的预览版。尝试从此处安装 VS2022 的预览版 3 - https://visualstudio.microsoft.com/vs/preview/
如@magicandre1981 所说,您的问题可能源于您在使用 Visual Studio 2019
时使用 .Net 6
每当我调试我的 Xamarin 表单(移动、C#、SignalR.Client)时,下面的消息总是弹出。这是我的客户端无法连接到 Asp.Net Core 中的集线器的原因吗?我的集线器无法正常工作。我一直在我的代码中发现错误,但这是我在我的代码中发现的唯一错误。我该如何解决这个问题?
Message:
Severity Code Description Project File Line Suppression State
Warning Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.
There was a conflict between "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
"System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
References which depend on "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [D:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll].
D:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll
Project file item includes which caused reference "D:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll".
System.Numerics.Vectors
References which depend on "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
C:\Users\Lenovo\.nuget\packages\system.text.json.0.0-preview.7.21377.19\lib\netstandard2.0\System.Text.Json.dll
Project file item includes which caused reference "C:\Users\Lenovo\.nuget\packages\system.text.json.0.0-preview.7.21377.19\lib\netstandard2.0\System.Text.Json.dll".
C:\Users\Lenovo\.nuget\packages\system.text.json.0.0-preview.7.21377.19\lib\netstandard2.0\System.Text.Json.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.http.connections.common.0.0-preview.7.21378.6\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Common.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.http.connections.client.0.0-preview.7.21378.6\lib\netstandard2.1\Microsoft.AspNetCore.Http.Connections.Client.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.signalr.client.0.0-preview.7.21378.6\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.dll
C:\Users\Lenovo\source\repos\App21\App21\App21\bin\Debug\netstandard2.0\App21.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.signalr.common.0.0-preview.7.21378.6\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Common.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.signalr.client.core.0.0-preview.7.21378.6\lib\netstandard2.1\Microsoft.AspNetCore.SignalR.Client.Core.dll
C:\Users\Lenovo\.nuget\packages\microsoft.aspnetcore.signalr.protocols.json.0.0-preview.7.21378.6\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.Json.dll App21.Android
.Net 6还没有发布,所以容易出错。此外,VS2022(预览版 3)更适合调试此问题,因为已创建环境以使用 .Net 6 的预览版。尝试从此处安装 VS2022 的预览版 3 - https://visualstudio.microsoft.com/vs/preview/
如@magicandre1981 所说,您的问题可能源于您在使用 Visual Studio 2019
时使用 .Net 6