visualstudio 2011 beta and Async
-
Sunday, March 04, 2012 11:09 PM
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 FunctionI'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. WhartyMicrosoft Community Contributor Friday, June 01, 2012 5:30 AM Fix title
- Moved by Mr. WhartyMicrosoft Community Contributor 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)
All Replies
-
Monday, March 05, 2012 2:46 PM
You should ask on one of the Visual Studio forums:
Karl
My Blog: http://unlockpowershell.wordpress.com
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})- Proposed As Answer by Karl Mitschke Tuesday, March 06, 2012 3:42 PM
-
Tuesday, August 28, 2012 4:40 PMModerator
MadridJose, is your project configured to target .NET 4.5 or .NET 4? If the latter, you'd either need to upgrade it to .NET 4.5, or you'd need to use the Async Targeting Pack (http://www.microsoft.com/en-us/download/details.aspx?id=29576).- Proposed As Answer by Stephen Toub - MSFTMicrosoft Employee, Moderator Tuesday, August 28, 2012 4:40 PM
- Marked As Answer by Reed Copsey, JrMVP, Moderator Wednesday, August 29, 2012 11:37 PM

