Repository navigation
Description
Steps to Reproduce
- create a new Xamarin.Forms application
- install a nuget that depends on System.Numerics.Vectors 4.5.0 like System.Text.Json or Signalr
- build the app
Expected Behavior
no warnings in output
Actual Behavior
warnings about version conflict:
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: 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".
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: "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.
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: References which depend on "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll].
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: Project file item includes which caused reference "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll".
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: System.Numerics.Vectors
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: References which depend on "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: Project file item includes which caused reference "C:\Users\USERNAME\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll".
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\system.text.json\5.0.2\lib\netstandard2.0\System.Text.Json.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\microsoft.aspnetcore.http.connections.common\3.1.19\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Common.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: D:\Foo.App\Foo.App\Foo.App\bin\Debug\Foo.App.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\microsoft.aspnetcore.http.connections.client\3.1.19\lib\netstandard2.1\Microsoft.AspNetCore.Http.Connections.Client.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\microsoft.aspnetcore.signalr.client\3.1.19\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\microsoft.aspnetcore.signalr.common\3.1.19\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Common.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\microsoft.aspnetcore.signalr.client.core\3.1.19\lib\netstandard2.1\Microsoft.AspNetCore.SignalR.Client.Core.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\microsoft.aspnetcore.signalr.protocols.json\3.1.19\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.Json.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\microsoft.aspnetcore.signalr.protocols.newtonsoftjson\3.1.19\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.dll
Microsoft.Common.CurrentVersion.targets(2203,5): warning MSB3277: C:\Users\USERNAME\.nuget\packages\microsoft.extensions.logging.eventsource\3.1.19\lib\netstandard2.0\Microsoft.Extensions.Logging.EventSource.dll
Version Information
Version 16.11.4
VisualStudio.16.Release/16.11.4+31727.386
Microsoft .NET Framework
Version 4.8.03752Xamarin 16.11.000.190 (d16-11@2391ed9)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.Xamarin Designer 16.11.0.17 (remotes/origin/11e0001f0b17269345e80b58fb3adf1ba4efe2cd@11e0001f0)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.Xamarin Templates 16.10.5 (355b57a)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.Xamarin.Android SDK 11.4.0.5 (d16-11/7776c9f)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: c633fe9
Java.Interop: xamarin/java.interop/d16-11@48766c0
ProGuard: Guardsquare/proguard@912d149
SQLite: xamarin/sqlite@85460d3
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-11@683f375
Now there is the question if we can ignore this, may this cause runtime errors?
Activity
jonathanpeppers commentedon Oct 11, 2021
@MagicAndre1981 can you share the exact
<PackageReference/>you have in a.csprojthat hits these warnings? Thanks.MagicAndre1981 commentedon Oct 12, 2021
Repro steps are easy, create new XF app and add those 2 SignalR packages
MagicAndre1981 commentedon Jan 24, 2022
Still happens in VS 2022 17.1 Preview 3 with SignalR 6.0.1 references. Addding
System.Numerics.Vectorsdirectly viaPackageReference Includemakes no difference.I checked a new MAUI App in 17.1 Preview 3 and here the System.Numerics.Vectors 6.0.1 is used and I see no warning. So this is an "issue" with old xamarin.
jonathanpeppers commentedon Jan 24, 2022
@MagicAndre1981 I'm afraid this issue probably won't be able to be solved until .NET 6. Do you have the problem in a
dotnet new androidordotnet new mauiapp?MagicAndre1981 commentedon Jan 25, 2022
with .net 6 it works fine. So this only happens in old classic xamarin.
jpobst commentedon May 2, 2024
With support for Classic Xamarin.Android ended May 1st, 2024, this issue is likely no longer relevant.
If this still persists in .NET 8+, please open a new issue with updated information based on
net8.0-androidor greater. Please include a link to this issue for context.