找不到程序集"mscorlib,版本=2.0.5.0



我已经更新了System.net.http至4.3.3,从那时起,我会遇到此错误。一个问题是为什么它仍然在包装夹中不存在时仍获取System.net.http 2.2.9文件。System.net.http.extensions不在我的参考列表中。我在哪里可以获得最新的DLL?感谢任何帮助。

这是详细模式中的构建日志

Could not resolve this reference. Could not locate the assembly "mscorlib, 
Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, 
Retargetable=Yes". Check to make sure the assembly exists on disk. If this 
reference is required by your code, you may get compilation errors.
6> For SearchPath"E:..packagesMicrosoft.Net.Http.2.2.29libnet45".
6> Considered 
"E:..packagesMicrosoft.Net.Http.2.2.29libnet45mscorlib.winmd", but it didn't exist.
6>Considered 
"E:..packagesMicrosoft.Net.Http.2.2.29libnet45mscorlib.dll", but it didn't exist.
6> Considered 
"E:..packagesMicrosoft.Net.Http.2.2.29libnet45mscorlib.exe", but it didn't exist.
Considered "binReleasemscorlib.winmd", but it didn't exist.
6> Considered "binReleasemscorlib.dll", but it didn't exist.
6> Considered "binReleasemscorlib.exe", but it didn't exist.
6> Required by "System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL".

您可以检查Nuget软件包是否退出使用软件包管理器控制台重新安装包装:

 Update-Package -reinstall 

您需要将所有DLL从debug folder复制到release folder

另一件事:确保您的项目文件不是仅读取的。如果仅读取,则通过右键单击项目文件夹并选择属性来删除仅读取属性。在属性屏幕中,删除仅读取的复选框。

如果那无法工作,请浏览此链接,您将找到有关您的问题的详细信息

最新更新