Am I missing something, or is Task.Run not available in Xamarin.Mac?

robertmiles3robertmiles3 USMember ✭✭
edited October 2013 in Xamarin.iOS

I am using System.Threading.Tasks and yet there is no Run method for a Task. I'm trying to do a simple async/await using Task.Run just like I've done in another non-Mono C# project. Am I missing something? Does something need to be updated that I'm not aware of? I'm on...

  • OS X Mavericks
  • Xamarin Studio 4.0.13
  • Mono 3.2.3
  • Xamarin.Mac 1.6.19

Answers

  • robertmiles3robertmiles3 USMember ✭✭

    I finally got it working and showing Task.Run by adding...

    <TargetFrameworkVersion>4.5</TargetFrameworkVersion>

    inside my .csproj file. I guess it was targeting an older version of the framework.

  • decriptordecriptor USBeta, Developer Group Leader Xamurai

    You should be able to change this in the project setting I believe instead of having to manually edit your csproj file.

  • robertmiles3robertmiles3 USMember ✭✭

    @decriptor, thanks for the response, but at the time Xamarin Studio had no way of setting it through the UI. I believe it does now after an update or two.

Sign In or Register to comment.