'Visual Studio does not clear error list cache of NewtonSoft JSON errors?

Visual Studio does not consider changes. Initially, I had a few libraries not properly set. Therefore, there were compile time errors. Then I added missing DLLs, and the errors disappeared in the code. However, Visual Studio still says there are errors, and does not allow to build the project.

I tried many ways to handle the problem, none of them was successful. Already tried ways:

  1. ReSharper > Options > General > Clear Cache
  2. Tools > C# > Advanced > Enable full solution analysis
  3. Deleting .vs folder
  4. Clearing VS' temp folder from \AppData\Local\Microsoft\WebsiteCache
  5. Restarting Visual Studio
  6. Restarting my own machine
  7. Clean the solution, project itself
  8. Attempt to Rebuild everything
  9. Unload/Reload solution and project
  10. I hope this will be found here and solve the problem

This is the error I am seing:

Error 'the type or namespace Newtonsoft could not be found'



Solution 1:[1]

Thank you all The problem was that Newtonsoft.Json Dll I used was for .net 4.5, but the project is in 4.0. Therefore, it did not work properly.

I changed Newtosfot.Json dll .net45 to .net40 and everything is working fine now

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Davronbek Rahmonov