When I target the .NET 4.0 runtime, I get this error:
System.TypeLoadException: Could not load type 'System.Func`2' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
This is resolved if I swith to the .NET 3.5 runtime. However, I need some features from .NET 4.0, mostly relating to threads. Is there a way to fix this problem?