Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin - Multi-targetting - "'System.ValueTuple`2' is declared in multiple referenced"

As soon as I try to compile code that use C# 7 tuples with multi targets (netstandard2.0 and xamarin.iOS) I got the following error:

Predefined type 'System.ValueTuple`2' is declared in multiple referenced assemblies

like image 994
François Avatar asked Apr 03 '18 15:04

François


2 Answers

It might've been added automatically as a reference from another package. Just remove that NuGet package to resolve the conflict.

uninstall-package System.ValueTuple is the command for the package manager console.

like image 99
Mafii Avatar answered Oct 10 '22 01:10

Mafii


I don't know which assemblies the conflict occurred in. However, I realized I had not myself added the ValueTuple nuget package so I explicitly did and the error went away.

like image 23
François Avatar answered Oct 10 '22 00:10

François