Avatar of Vrik22
Vrik22

asked on 

Method not found: Newtonsoft Json exception at runtime c# MVC application

Hi ,

I am getting at runtime 'Void Newtonsoft.Json.Serialization.DefaultContractResolver.set_IgnoreSerializableAttribute(Boolean) exception when i run an MVC 4 application, whereas the same code (shared via TFS) is running perfectly in another system.
Both the system have Target framework 4.5 and Newtonsoft Json version 4.5 and Microsoft.AspNet.WebApi.Client.4.0.30506.0 package
(I am getting the exception at  WebApiConfig.Register(GlobalConfiguration.Configuration); line.)

Can i know how to resolve it ? It urgent !
.NET ProgrammingC#ASP.NET

Avatar of undefined
Last Comment
Vrik22
Avatar of Lokesh B R
Lokesh B R
Flag of India image

Hi,

You need to install the NewtonSoft.Json from the Nuget package in the project.
Avatar of Vrik22
Vrik22

ASKER

Hey i got you ,but i cannot update Newtonoft pacakge as i have to use the one compatible/available in the TFS solution .
Avatar of Vrik22
Vrik22

ASKER

Moreover the same project is working on other machines , with the existing package in TFS . I too have the same code as i have taken the latest and did not edit anything.
Avatar of Lokesh B R
Lokesh B R
Flag of India image

Hi,

If you have any older version in GAC also throws you this problem.
Avatar of Vrik22
Vrik22

ASKER

Hi ,
I searched in %windir%\Microsoft.NET\assembly 32,64 and MSIL , but could not find Newtonsoft dll
ASKER CERTIFIED SOLUTION
Avatar of Vrik22
Vrik22

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Lokesh B R
Lokesh B R
Flag of India image

Hi,

Yes.

Looks like you have reference to multiple projects.
Avatar of Vrik22
Vrik22

ASKER

The solution mentioned in my comment helped me in resolving the issue
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo