Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 类型';HttpClient';存在于System.Net.Http版本=4.0.0.0和System.Net.Http版本=4.1.1.2中_C#_Reference_Nuget Package - Fatal编程技术网

C# 类型';HttpClient';存在于System.Net.Http版本=4.0.0.0和System.Net.Http版本=4.1.1.2中

C# 类型';HttpClient';存在于System.Net.Http版本=4.0.0.0和System.Net.Http版本=4.1.1.2中,c#,reference,nuget-package,C#,Reference,Nuget Package,我在VS2017中遇到以下生成错误问题 Error CS0433: The type 'HttpClient' exists in both 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' (20

我在VS2017中遇到以下生成错误问题

  Error CS0433: The type 'HttpClient' exists in both 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' (20, 26)
我一直在尝试以下方法:

  • 将所有现有参考更新至4.1.1.2
  • 将4.1.1.2安装到解决方案中的所有项目
  • 添加了到所有项目的绑定重定向
我肯定错过了什么,但是什么?
有没有办法找到将其锁定到4.0.0.0的原因?

RestSharp安装?从属程序集配置中存在绑定冲突。看这个:这个:。需要一些手动编辑。@我想到了Jimi RestSharp,但如果可能的话,我想解决根目录的问题。版本为4.6.25705.1的Build folder outputs System.Net.Http也应该如此fine@mjwills整合没有帮助,正在检查包并更新可以安全更新的包等,但如果加载包管理器,仍然会出错,
合并
选项卡中是否显示任何内容?@mjwills否,没有显示任何内容