$ 0 0 I cannot reproduce the access violation with your code. It might be related to the crash inside the 'EnableOpenCL' method. Can you post the InnerException of the TypeInitializationException?