Skip to content
Welcome to Spicy Pixel Answers, where you can ask questions and receive answers from the support team and other members of the community.

Concurrency Kit for Unity using compatibility level .Net 2.0 subset?

0 votes

Hi, when running my unity application on IOS, with .NET 2.0 as Api compatibility level I get the following exception:

ExecutionEngineException: Attempting to call method 'System.Reflection.MonoProperty::GetterAdapterFrame' for which no ahead of time (AOT) code was generated.

I'm was forced to set .Net 2.0 profile in able to get the application to build on IOS after adding the Concurrency Kit. When removing the kit and reverting to .NET2.0 subset everything works. Do you know a way around this, or is it possible to make a concurrency kit that is supported by the .NET 2.0 subset compatibility level?

When using the kit with .NET 2.0 Subset i get the following build fail on IOS:

Fatal error in Mono CIL Linker
System.Exception: Error processing method: 
'System.Void System.Threading.Tasks.TpScheduler::QueueTask(System.Threading.Tasks.Task)' 
in assembly: 
'System.Threading.dll' ---> Mono.Cecil.ResolutionException: 
Failed to resolve System.Boolean 

I'm using Unity 5.2.1f1 and version 1.0.5 of the concurrency kit.

asked Oct 26, 2015 in Concurrency Kit by peterde (240 points)

1 Answer

0 votes
Best answer

You might be able to enable subset compatibility by updating TpScheduler.QueueTask to use QueueUserWorkItem instead of UnsafeQueueUserWorkItem. You will need to recompile the DLL from source for this.

Please see lin 57 here:

answered Oct 27, 2015 by admin (2,500 points)
selected Oct 28, 2015 by peterde
How to build the dll?
Thanks, it worked!