Error trying to TweetAsync

Feb 11, 2015 at 11:31 AM
Hi

I'm using LinqToTwitter successfully to pull statuses into a ASP.NET website, however I'm now trying to update statuses. Here is my code
 public async Task tweet(string status)
    {

        var auth = new SingleUserAuthorizer
        {
            CredentialStore = new SingleUserInMemoryCredentialStore
            {
                ConsumerKey = consumerKey,
                ConsumerSecret = consumerSecret,
                AccessToken = accessToken,
                AccessTokenSecret = accessTokenSecret
            }
        };

        var ctx = new TwitterContext(auth);

        var tweet = await ctx.TweetAsync(status);

    }
I get the following errors,

The type 'System.Threading.Tasks.Task1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Cannot await 'System.Threading.Tasks.Task
1<LinqToTwitter.Status>'

Both errors seem to happen on the var tweet = await ctx.TweetAsync(status) line

I must be missing something very obvious, but can't work out why it's not working.
Coordinator
Feb 24, 2015 at 3:33 AM
Hi,

You should add a reference to the System.Threading.Tasks assembly.

@JoeMayo