10

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

Mafii
  • 7,227
  • 1
  • 35
  • 55
François
  • 3,164
  • 25
  • 58

2 Answers2

10

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.

Mafii
  • 7,227
  • 1
  • 35
  • 55
5

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.

Mafii
  • 7,227
  • 1
  • 35
  • 55
François
  • 3,164
  • 25
  • 58