VS11 Beta Does Not Recognize async/await in Silverlight - by djarekg

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


22
0
Sign in
to vote
ID 727285 Comments
Status Resolved Workarounds
Type Bug Repros 10
Opened 2/29/2012 12:39:38 PM
Access Restriction Public
Moderator Decision Sent to Engineering Team for consideration

Description

VS11 beta does not recognize the async/await keywords in silverlight when building the project. This is the error i get below. I have the async ctp v3 install and I am referrencing the AsyncCtpLibrary_Silveright5.dll in the project.

Cannot find all types required by the 'async' modifier. Are you targeting the wrong framework version, or missing a reference to an assembly?
Sign in to post a comment.
Posted by Microsoft on 4/26/2012 at 2:51 PM
Thanks to everyone for your patience - we know how excited you've been to try out Visual Studio 11 Beta!

To resolve this issue for Silverlight 5 and .NET 4.0, we're happy to announce the Async Targeting Pack for Visual Studio 11! This pack lets your Visual Studio 11 Beta projects that target Silverlight 5 or .NET 4.0 use the Async language support introduced in C# 5 and Visual Basic 11. Simply remove any references to the Async CTP libraries and add a reference to the Async Targeting Pack NuGet package, and you're good to go!

For more information on how to reference this NuGet package in your Visual Studio 11 Beta projects, download the release notes here: http://go.microsoft.com/fwlink/p/?LinkID=250980

Enjoy!

Alex Turner
Program Manager
Visual Basic and C# Compiler
Posted by Jonas Kello on 3/18/2012 at 2:23 PM
Some more info here:

http://blogs.msdn.com/b/pfxteam/archive/2012/03/03/10277166.aspx
Posted by ripeness on 3/1/2012 at 3:01 PM
Having the same issue with Silverlight 5 project.
Posted by Nick Black on 3/1/2012 at 9:30 AM
I'm also having this problem in a WPF project that uses the async CTP. The target framework is set to .NET 4.0 (Client Profile).
Posted by djarekg on 3/1/2012 at 5:43 AM
If you guys are working on a way to make it possible to use async in SL, can you please come out with a hotfix or something soon (before the final release), because xaml intellense did not work for me in converted SL projects in the preview and therefor I was unable to use the preview version, which suchs because I wasn't able to test and contribute feedback on my experience. And now with this release I am once again unable to use it, which is completely excluding me from the testing and beta use experience. A real big drag not being able to play around with VS11 since it was originally released back in Sept of 2011.
Posted by thedo on 2/29/2012 at 11:47 PM
Given the async is merely syntactic sugar over Task Continuations (available in SL5) I'd expect this to work too.
Posted by MS-Moderator10 [Feedback Moderator] on 2/29/2012 at 11:35 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by nonameplum on 2/29/2012 at 11:23 PM
Yes, I installed new Windows 8 customer preview and Visual Studio 11 beta Ultimate and I have also the same problem. Problem occurs only in Silverlight 4/5.
Posted by MS-Moderator01 on 2/29/2012 at 6:36 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by Jonas Kello on 2/29/2012 at 2:48 PM
The same error occurs when creating a new SL project and using the async keywork. To reproduce just create a new Silverlight Applicaton and add a function like this one:

        private async void test1()
        {
        }