[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved #6375

Closed
MagicAndre1981 opened this issue Oct 8, 2021 · 6 comments
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects.

Comments

@MagicAndre1981
Copy link

Steps to Reproduce

  1. create a new Xamarin.Forms application
  2. install a nuget that depends on System.Numerics.Vectors 4.5.0 like System.Text.Json or Signalr
  3. 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.03752

Xamarin 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?

@MagicAndre1981 MagicAndre1981 added Area: App+Library Build Issues when building Library projects or Application projects. needs-triage Issues that need to be assigned. labels Oct 8, 2021
@jonathanpeppers jonathanpeppers removed the needs-triage Issues that need to be assigned. label Oct 11, 2021
@jonathanpeppers jonathanpeppers added this to the Under Consideration milestone Oct 11, 2021
@jonathanpeppers
Copy link
Member

@MagicAndre1981 can you share the exact <PackageReference/> you have in a .csproj that hits these warnings? Thanks.

@MagicAndre1981
Copy link
Author

@MagicAndre1981 can you share the exact <PackageReference/> you have in a .csproj that hits these warnings?

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.SignalR.Client">
      <Version>3.1.20</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.Json">
      <Version>3.1.20</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Forms" Version="5.0.0.2125" />
    <PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
  </ItemGroup>

Repro steps are easy, create new XF app and add those 2 SignalR packages

@MagicAndre1981
Copy link
Author

Still happens in VS 2022 17.1 Preview 3 with SignalR 6.0.1 references. Addding System.Numerics.Vectors directly via PackageReference Include makes 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
Copy link
Member

@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 android or dotnet new maui app?

@MagicAndre1981
Copy link
Author

with .net 6 it works fine. So this only happens in old classic xamarin.

@jpobst
Copy link
Contributor
jpobst commented 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-android or greater. Please include a link to this issue for context.

@jpobst jpobst closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: App+Library Build Issues when building Library projects or Application projects.
Projects
None yet
Development

No branches or pull requests

4 participants