visualstudio 2011 beta and Async


  • I have installed this new version of VS2011-beta

    I have defined a Function for retrieving a record from  a given table:

    Imports System.Threading.Tasks
    Private Async Function Get Record(ByVal PrimaryKey As Integer) As Task(Of Table1)
            Return Await domainservice1.Table1s.FirstOrDefault(Function(p) p.PrimaryKey = PrimaryKey)
    End Function

    I'm alwasy getting this message under 'GetRecord' (name of the function):

    Cannot find all types required by the 'Async' modifier. Are you targeting the wrong framework version or missing a reference to an assembly ?

    which is this reference to an assembly containning all types required ?

    • Moved by Larry Yin Wednesday, March 07, 2012 2:35 AM (From:MSDN, TechNet, and Expression Profile and Recognition System Discussions)
    • Edited by Mr. Wharty Friday, June 01, 2012 5:30 AM Fix title
    • Moved by Mr. Wharty Friday, June 01, 2012 5:31 AM (From:Off-Topic Posts (Do Not Post Here))
    • Moved by Shyam NamboodiripadMicrosoft employee Monday, June 11, 2012 7:33 PM This question does not have anything to do with Roslyn but seems related to Async. Moving to the Async CTP Forum. (From:Microsoft "Roslyn" CTP)
    Sunday, March 04, 2012 11:09 PM


All replies