Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/324.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# System.Net.Http版本未在引用列表中排列_C#_Asp.net_Visual Studio 2017_Nuget Package - Fatal编程技术网

C# System.Net.Http版本未在引用列表中排列

C# System.Net.Http版本未在引用列表中排列,c#,asp.net,visual-studio-2017,nuget-package,C#,Asp.net,Visual Studio 2017,Nuget Package,我们在.NET4.6.1上有一个项目,我们在其中添加了IdentityServer包 我们得到的一个错误显然是通过将System.Net.Http.dll更新为版本4.3.3()解决的 问题似乎是VS 2017(15.7.3)只引用C:\Program Files(x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.NET.H

我们在.NET4.6.1上有一个项目,我们在其中添加了IdentityServer包

我们得到的一个错误显然是通过将System.Net.Http.dll更新为版本4.3.3()解决的

问题似乎是VS 2017(15.7.3)只引用
C:\Program Files(x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.NET.Http.dll
,而不是
packages\System.NET.Http.3\lib\net46\System.NET.Http.dll
,即使我手动添加它。至少这是reference details窗口中显示的路径和最终位于bin文件夹中的版本

查看它显示的.csproj


假的
..\packages\System.Net.Http.4.3.3\lib\net46\System.Net.Http.dll

另一件使这一点复杂化的事情是,NuGet版本、文件版本和程序集版本之间没有矩阵可以帮助我解决这个问题

我正在检查多个环境,但我只能得到文件版本,没有什么可交叉检查的

NuGet Package 4.3.3=
文件版本:4.6.25705.1

框架中的版本dir=
4.6.26011.1

我们某个环境中的某个版本不起作用=
4.6.25514.4