title: Task does not contain a definition for 'FirstOrDefault'
body: <blockquote>
    <p>Error CS1061  'Task>' does not contain a definition for
    'FirstOrDefault' and no extension method 'FirstOrDefault' accepting a
    first argument of type 'Task>' could be found (are you
    missing a using directive or an assembly reference?) ,</p>
  </blockquote>
  
  <p>making a web application with facebook controller, included using system.linq but still getting the error for <code>FirstOrDefault()</code>.
  I dont know what the problem is, i reinstalled visual studio too as he same thing works for my friends laptop.
  I juggled around to see if the method is present in the library and it is there but still not getting past this <a href="https://i.stack.imgur.com/x9s7p.jpg" rel="nofollow noreferrer">Image for the same</a> </p>
  
  <pre><code>public async Task&lt;ActionResult&gt; Posts()
  {
      var currentClaims = UserManager.GetClaimsAsync(HttpContext.Identity.GetUserId());
  
      // Error occurs here at FirstOrDefault
      var accesstoken = currentClaims.FirstOrDefault(x = &gt; x.Type == "urn:tokens:facebook");
  
      if (accesstoken == null)
      ...
  }
  </code></pre>