简体   繁体   中英

Could not locate the assembly "mscorlib, Version=2.0.5.0

I have updated System.Net.Http to 4.3.3 and since then I'm getting this error. One question is why is it still fetching System.Net.Http 2.2.9 files while it is not present in packages folder. System.Net.Http.Extensions is not in my References list. Where can I get the latest dll? Appreciate any help.

Here is the build log in Detailed mode

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:..\packages\Microsoft.Net.Http.2.2.29\lib\net45".
6> Considered 
"E:..\packages\Microsoft.Net.Http.2.2.29\lib\net45\mscorlib.winmd", but it didn't exist.
6>Considered 
"E:\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\mscorlib.dll", but it didn't exist.
6> Considered 
"E:\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\mscorlib.exe", but it didn't exist.
Considered "bin\Release\mscorlib.winmd", but it didn't exist.
6> Considered "bin\Release\mscorlib.dll", but it didn't exist.
6> Considered "bin\Release\mscorlib.exe", but it didn't exist.
6> Required by "System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL".

You can check that nuget packages exit or not reinstall the packages using the Package Manager Console:

 Update-Package -reinstall 

You need to copy all dlls from debug folder to release folder .

One thing more: Make sure your project files are not read-only. if it is read only then remove the read-only property by right clicking on the project folder and select properties. In the properties screen remove the read-only checkbox.

If that will not work then go through This Link You will find details regarding your problem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM