I am trying to execute some processes in parallel. and it is my first time doing that, upon trying : using System.Threading.Tasks; Tasks will be underlined in red saying :
The Type or namespace name "Tasks" does not exist in the namespace System.Threading(are you missing an assembly reference?)
how do i resolve that!?
Does your project target .NET 3.5 or lower, perhaps? System.Threading.Tasks
was introduced in .NET 4 - just using Visual Studio 2010 isn't enough; you need to target the appropriate framework. (Fortunately it is in the .NET 4 client profile, which is often a little "gotcha" for some other types.)
Likewise Silverlight hasn't yet got the TPL, although IIRC it's coming in Silverlight 5.
Make sure that you are targeting .NET 4.0 in the properties of your project. TPL is not available in previous versions of .NET.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With