Open nZeus opened 2 years ago
I can also see similar warnings about a version conflict when building my project:
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" [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll].
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll
Project file item includes which caused reference "C:\Program Files (x86)\Microsoft Visual Studio\2019\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\Pavel\.nuget\packages\system.text.json\4.7.2\lib
etstandard2.0\System.Text.Json.dll
Project file item includes which caused reference "C:\Users\Pavel\.nuget\packages\system.text.json\4.7.2\lib
etstandard2.0\System.Text.Json.dll". C:\Users\Pavel\.nuget\packages\system.text.json\4.7.2\lib
etstandard2.0\System.Text.Json.dll D:\dotNET\MorseCode\MorseCode\MorseCode\bin\Debug
etstandard2.0\MorseCode.dll
Hi, I can also see similar conflicts founds.
The packages I used are
I can also see this warnings:
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" [C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Numerics.Vectors.dll]. C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Numerics.Vectors.dll Project file item includes which caused reference "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\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\xx.nuget\packages\system.memory\4.5.3\lib\netstandard2.0\System.Memory.dll Project file item includes which caused reference "C:\Users\xx.nuget\packages\system.memory\4.5.3\lib\netstandard2.0\System.Memory.dll". C:\Users\xx.nuget\packages\system.memory\4.5.3\lib\netstandard2.0\System.Memory.dll C:\Users\xx.nuget\packages\sqlite-net-pcl\1.7.335\lib\netstandard2.0\SQLite-net.dll C:\Users\xx.nuget\packages\monkeycache.sqlite\1.5.2\lib\xamarinios10\MonkeyCache.SQLite.dll C:\Users\xx\source\repos\mobilemis\src\yy\bin\Debug\netstandard2.1\yy.dll C:\Users\xx.nuget\packages\sqlitepclraw.core\2.0.3\lib\netstandard2.0\SQLitePCLRaw.core.dll C:\Users\xx.nuget\packages\sqlitepclraw.bundle_green\2.0.3\lib\Xamarin.iOS10\SQLitePCLRaw.batteries_v2.dll C:\Users\xx.nuget\packages\sqlitepclraw.provider.dynamic_cdecl\2.0.3\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll yy.iOS C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets 2304
Same issue here with latest VS 2022 for Mac (17.0 preview build 8567)
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,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".
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,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.
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: References which depend on "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Numerics.Vectors.dll].
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: /Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Numerics.Vectors.dll
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: Project file item includes which caused reference "/Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/System.Numerics.Vectors.dll".
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: System.Numerics.Vectors
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: References which depend on "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: /Users/fmeyer/.nuget/packages/system.text.json/6.0.1/lib/netstandard2.0/System.Text.Json.dll
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: Project file item includes which caused reference "/Users/fmeyer/.nuget/packages/system.text.json/6.0.1/lib/netstandard2.0/System.Text.Json.dll".
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: /Users/fmeyer/.nuget/packages/system.text.json/6.0.1/lib/netstandard2.0/System.Text.Json.dll
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: /Users/fmeyer/.nuget/packages/refit/6.3.2/lib/netstandard2.1/Refit.dll
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: /Users/fmeyer/work/repositories/customers/fipac/fipac-mobile/fipacapp/fipacapp/bin/Debug/netstandard2.1/fipacapp.dll
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): warning MSB3277: /Users/fmeyer/.nuget/packages/system.net.http.json/6.0.0/lib/netstandard2.0/System.Net.Http.Json.dll
this is an Xamarin.Android/Tooling issue, which I reported some time ago. With MAUI, which uses .net6 it no longer shows up.
Unfortunately, many teams cannot upgrade to MAUI yet. Any plans to have this fixed for Xamarin, please?
Any plans to have this fixed for Xamarin, please?
I doubt this. In the apk I see the newer dll so it looks like it gets used and the apps work fine so far.
I had the same problem, I solved it by: -put my solution in .net standard 2.1
@cedricaxel I tried to reference the package manually, but it had no effect. I still get the warning. What exactly you did and what did you have to suppress?
Below is the reference part of csproj file for Android:
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Numerics.Vectors">
<Version>4.5.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.7" />
<PackageReference Include="Xamarin.Forms.Maps">
<Version>5.0.0.2578</Version>
</PackageReference>
</ItemGroup>
Description
A few months ago we upgraded to the latest version of Xamarin.Forms, and since then we keep getting a warning
MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved
.So far this seems to be a bug in Xamarin.Forms which, for some reason, references MonoAndroid v1.0:
Steps to Reproduce
Xamarin.Forms@5.0.0.2244
and any of these:Prism.Plugin.Logging.Common@8.1.16
Refit@5.2.4
System.Net.Http.Json@5.0.0
IdentityModel@5.2.0
Expected Behavior
No warnings should be shown
Actual Behavior
MSB3277: Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved
is thereBasic Information
Environment
Show/Hide Visual Studio info
``` Microsoft Visual Studio Community 2022 Version 17.0.4 VisualStudio.17.Release/17.0.4+32014.148 Microsoft .NET Framework Version 4.8.04161 Installed Version: Community .NET Core Debugging with WSL 1.0 .NET Core Debugging with WSL ADL Tools Service Provider 1.0 This package contains services used by Data Lake tools ASA Service Provider 1.0 ASP.NET and Web Tools 2019 17.0.795.42246 ASP.NET and Web Tools 2019 ASP.NET Web Frameworks and Tools 2019 17.0.795.42246 For additional information, visit https://www.asp.net/ Azure App Service Tools v3.0.0 17.0.795.42246 Azure App Service Tools v3.0.0 Azure Data Lake Tools for Visual Studio 2.6.4000.0 Microsoft Azure Data Lake Tools for Visual Studio Azure Functions and Web Jobs Tools 17.0.795.42246 Azure Functions and Web Jobs Tools Azure Stream Analytics Tools for Visual Studio 2.6.4000.0 Microsoft Azure Stream Analytics Tools for Visual Studio C# Tools 4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools. Extensibility Message Bus 1.2.6 (master@34d6af2) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration. Fabric.DiagnosticEvents 1.0 Fabric Diagnostic Events Microsoft Azure Hive Query Language Service 2.6.4000.0 Language service for Hive query Microsoft Azure Service Fabric Tools for Visual Studio 17.0 Microsoft Azure Service Fabric Tools for Visual Studio Microsoft Azure Stream Analytics Language Service 2.6.4000.0 Language service for Azure Stream Analytics Microsoft Azure Tools for Visual Studio 2.9 Support for Azure Cloud Services projects Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines Microsoft Library Manager 2.1.134+45632ee938.RR Install client-side libraries easily to any web project Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers Microsoft Visual Studio Tools for Containers 1.2 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container. Mono Debugging for Visual Studio 17.0.11 (54f19d2) Support for debugging Mono processes with Visual Studio. NuGet Package Manager 6.0.1 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/ ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info Razor (ASP.NET Core) 17.0.0.2156603+e9cd763349a080127b6519ffbec0123949a4c385 Provides languages services for ASP.NET Core Razor. SQL Server Data Tools 17.0.62110.20190 Microsoft SQL Server Data Tools TGit 1.0 Control TortoiseGit from within Visual Studio ToolWindowHostedEditor 1.0 Hosting json editor into a tool window TypeScript Tools 17.0.1001.2002 TypeScript Tools for Microsoft Visual Studio Visual Basic Tools 4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Visual F# Tools 17.0.0-beta.21522.2+6d626ff0752a77d339f609b4d361787dc9ca93a5 Microsoft Visual F# Tools Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio Visual Studio Container Tools Extensions 1.0 View, manage, and diagnose containers within Visual Studio. Visual Studio IntelliCode 2.2 AI-assisted development for Visual Studio. Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers VisualStudio.DeviceLog 1.0 Information about my package VisualStudio.Foo 1.0 Information about my package VisualStudio.Mac 1.0 Mac Extension for Visual Studio Word Highlight With Margin Extension 1.0 Highlight all occurrences of a selected word and display carets on the enhanced vertical scrollbar at the right margin. Xamarin 17.0.0.343 (d17-0@fb07a17) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android. Xamarin Designer 17.0.0.183 (remotes/origin/d17-0@a351f0f1f) Visual Studio extension to enable Xamarin Designer tools in Visual Studio. Xamarin Templates 17.0.17 (9e779b0) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms. Xamarin.Android SDK 12.1.0.5 (d17-0/6b0e6b2) Xamarin.Android Reference Assemblies and MSBuild support. Mono: c633fe9 Java.Interop: xamarin/java.interop/d17-0@febb1367 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.36.0@a575761 Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-0@a5194e9 Xamarin.iOS and Xamarin.Mac SDK 15.4.0.0 (8fc41ae82) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support. ```Build Logs
Show/Hide Build Logs
``` Done building project "Buddy.App.csproj". 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" [C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll]. C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Numerics.Vectors.dll Project file item includes which caused reference "C:\Program Files\Microsoft Visual Studio\2022\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\itsve\.nuget\packages\system.text.json\5.0.2\lib etstandard2.0\System.Text.Json.dll Project file item includes which caused reference "C:\Users\itsve\.nuget\packages\system.text.json\5.0.2\lib etstandard2.0\System.Text.Json.dll". C:\Users\itsve\.nuget\packages\system.text.json\5.0.2\lib etstandard2.0\System.Text.Json.dll D:\Repos\Buddy.BuddyApp\Buddy.App.Services\bin\Debug etstandard2.0\Buddy.App.Services.dll D:\Repos\Buddy.BuddyApp\Buddy.App\Buddy.App\bin\Debug etstandard2.0\Buddy.App.dll C:\Users\itsve\.nuget\packages\identitymodel\5.2.0\lib etstandard2.0\IdentityModel.dll C:\Users\itsve\.nuget\packages\prism.plugin.logging.common\8.1.16\lib\monoandroid10.0\Prism.Plugin.Logging.Common.dll C:\Users\itsve\.nuget\packages\refit\5.2.4\lib etstandard2.1\Refit.dll C:\Users\itsve\.nuget\packages\buddy.auth.apiclient\2021.12.1.1\lib etstandard2.0\Buddy.Auth.ApiClient.dll C:\Users\itsve\.nuget\packages\buddy.budgetting.apiclient\2021.12.29.4\lib etstandard2.0\Buddy.Budgetting.ApiClient.dll C:\Users\itsve\.nuget\packages\system.net.http.json\5.0.0\lib etstandard2.0\System.Net.Http.Json.dll ```Screenshots
See above
Workaround
No workaround