Profiling JSON.net

Code profiling for .NET developers.

Moderators: AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Profiling JSON.net

Postby icube » Fri Oct 26, 2012 8:54 am

Hi,

I have a problem profiling my app which uses the JSON.net library. http://json.codeplex.com/. It reports the following exception: VerificationException: Operation could destabilize the runtime.

And yes, my app runs smoothly when it is not profiling. Thanks!
icube
 
Posts: 2
Joined: Wed Oct 24, 2012 2:52 pm
Location: Singapore

Postby james.billings » Mon Oct 29, 2012 1:20 pm

We've seen this previously- it's due to some tighter security that's incompatible with line level timings.

You can get around it by changing some of the Json source:

- find JsonWriter.cs
- comment out "[assembly:System.Security.SecurityTransparent]"
- expand the "properties" folder
- comment out "[assembly:AllowPartiallyTrustedCallers]" in the #if !SILVERLIGHT region
- rebuild your solution

With those changes, it should hopefully work. You can uncomment the lines again when you release your app if you wish.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to ANTS Performance Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests