Liker777 Liker777 - 3 months ago 31
C# Question

Could not load file or assembly ... The parameter is incorrect

Recently I met the following exception at C# solution:

Error 2 Could not load file or assembly 'Newtonsoft.Json,
Version=, Culture=neutral, PublicKeyToken=b9a188c8922137c6' or
one of its dependencies. The parameter is incorrect. (Exception from

This does not depend either on my code or on the name of assembly (like
in this case).

When I delete this dll from the solution the compiler tells about another in the same exception. So I suppose something shoud be turned off/on at my PC :)


Looks like a corrupted assembly being referenced.

Clear both:

  1. the \bin folder of your project

  2. the temp folder (should be C:\Users\your_username\AppData\Local\Temp\Temporary ASP.NET Files in windows 7)

and see if the error still happens