Using Unity 4.6.1
My code is crashing with an ExecutionEngineException when I am adding a handler to a delegate event. The delegate’s signature is
public delegate void OnDelegate (string channel, string message);
Its pretty simple with no generics. The delegate and the class in question are located inside a dll, if that has anything to do with it.
My exception is :
ExecutionEngineException: Attempting to JIT compile method ‘(wrapper managed-to-native) System.Threading.Interlocked:CompareExchange (MyDll.OnDelegate&,MyDll.OnDelegate,MyDll.OnDelegate)’ while running with --aot-only.