[英]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:一旦我尝试编译使用具有多个目标( netstandard2.0
和xamarin.iOS
)的 C# 7 元组的代码,我就会收到以下错误:
Predefined type 'System.ValueTuple`2' is declared in multiple referenced assemblies在多个引用的程序集中声明了预定义类型“System.ValueTuple`2”
It might've been added automatically as a reference from another package.它可能是作为另一个包的参考自动添加的。 Just remove that NuGet package to resolve the conflict.只需删除该 NuGet 包即可解决冲突。
uninstall-package System.ValueTuple
is the command for the package manager console. uninstall-package System.ValueTuple
是包管理器控制台的命令。
我不知道冲突发生在哪个程序集中。但是,我意识到我自己没有添加ValueTuple
nuget 包,所以我明确添加了并且错误消失了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.