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 ?

    Sunday, March 04, 2012 11:09 PM


All replies