System.Security.VerificationException when running ANTS profiler in .net 4.0

I have been using RedGate ANTS Performance Profiler for a while. We recently upgraded our third-party DLLs (Telerik) to their version of .net 4.0. When we did this, I can no longer profile our code, because as soon as I hit the Telerik control, I get:

System.Security.VerificationException: Operation may destabilize runtime.

I spoke with RedGate, and they told me: "In essence, it all depends on Microsoft and their changes to CASPOL. ANTS has more features, and these features require high privileges so that ANTS can read metadata from assemblies in the production environment .."

Their suggestion was to start the process in full trust mode. How to do it?

I tried to make adjustments to our Assembly.cs file, but since the problem is not created from our code, I cannot do this in terms of setting up the code.

PS Our application is a WPF / Winforms desktop application. I found solutions for web applications by making changes to web.config, but I really cannot find an equivalent solution (or understand it if it exists).

+7
source share

All Articles