开发者

Json.NET + VerificationException Operation could destabilize the runtime

开发者 https://www.devze.com 2023-03-04 23:59 出处:网络
I am getting the \"Operation could destablize the runtime exception\". I goggled quite a bit, looks like exception has to do with conflicting assemblies being loaded at runtime.

I am getting the "Operation could destablize the runtime exception". I goggled quite a bit, looks like exception has to do with conflicting assemblies being loaded at runtime. So, here are couple of things

  1. the same source code works in my colleagues machine.
  2. I looked and searched for each reference to NewtonSoft.Json.dll and it seems like its coming from a same assembly. (I think this would not be a problem as it is working in other people machine).
  3. I am using Raven which references NewtonSoft, but its not being used on the server side only on the client / silverlight side. Also to be compatible I am referencing to the same version of Newtonsoft that raven is referencing to.

Now, the problem might be something I installed in the machine that's affecting this. some runtime / SP i开发者_如何学JAVAnstall etc. Is there a way to debug / figure out what's happening here. I looked and searched for NewtonSoft.dll when the app runs and it gets right version in the temporary asp.net files. ?

Any help could be greatly appreciated. I don't want to go through installing my runtime.


This exception can occur when you have Visual Studio Ultimate and IntelliTrace activated.

Try to add Newtonsoft.dll on IntelliTrace ignore list:

  • Tools -> Options -> IntelliTrace -> Modules
  • Add -> Newtonsoft.


This bug is fixed in the latest version of Json.NET - http://james.newtonking.com/archive/2012/01/23/json-net-4-0-release-6-serialization-performance.aspx


This is a known issue.

You should be able to fix this by removing all references to the JSON .NET library and adding them again to the projects.

See also:

http://json.codeplex.com/workitem/20624

JSON.Net throwing System.Security.VerificationException: Operation could destabilize the runtime

0

精彩评论

暂无评论...
验证码 换一张
取 消