我收到“操作可能会破坏运行时异常的稳定性”。我仔细观察了一下,看起来异常与运行时加载的冲突程序集有关。
因此,这里有一些
- 相同的源代码在我同事的机器上工作的事情。
- 我查看并搜索了对 NewtonSoft.Json.dll 的每个引用,它似乎来自同一个程序集。 (我认为这不会成为问题,因为它在其他人的机器上工作)。
- 我正在使用 Raven,它引用了 NewtonSoft,但它没有在服务器端使用,仅在客户端/ silverlight 端使用。另外为了兼容,我引用了 raven 引用的同一版本的 Newtonsoft。
现在,问题可能是我在机器中安装的某些东西影响了这一点。一些运行时/SP安装等。
有没有办法调试/弄清楚这里发生了什么。当应用程序运行时,我查看并搜索了 NewtonSoft.dll,它在临时 asp.net 文件中获得了正确的版本。 ?
任何帮助将不胜感激。我不想安装运行时。
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
- the same source code works in my colleagues machine.
- 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).
- 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 install 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.
发布评论
评论(3)
当您激活 Visual Studio Ultimate 和 IntelliTrace 时,可能会发生此异常。
尝试将 Newtonsoft.dll 添加到 IntelliTrace 忽略列表中:
This exception can occur when you have Visual Studio Ultimate and IntelliTrace activated.
Try to add Newtonsoft.dll on IntelliTrace ignore list:
此错误已在最新版本的 Json.NET 中修复 - http://james.newtonking.com/archive/2012/01/23/json-net-4-0-release-6-serialization-performance.aspx
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
这是一个已知问题。
您应该能够通过删除对 JSON .NET 库的所有引用并将它们再次添加到项目中来解决此问题。
另请参阅:
http://json.codeplex.com/workitem/20624
JSON.Net 抛出System.Security.VerificationException:操作可能会破坏运行时的稳定性
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