Friday, January 25, 2013

How to fix "Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."

Today i got a very weired error as following
"Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."


when i check my project properties, under the application tab. the target framework had been
set to .Net Framework 3.5














the root cause of this issue is that new library
using System.Net.Http; 
using System.Web.Script.Serialization;  
that Newtonsoft.Json depends on are  Available at the .Net Framework 4.0 or 4.5.
after i switched to the latest .Net Framework.the project compile and the page was launched.





No comments:

Post a Comment