Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When I try and compile a Xamarin.iOS app that contains the async/await keyword, I get the following error:
Error 1 Invalid token 'void' in class, struct, or interface member declaration
The code its trying to compile is:
async void loginPressed ()
OS: Windows 8 64x
iOS: MTVS 1.4 alpha
VS: VS 2010
VS2010 does not support C# 5 - and installing .NET 4.5 won't help, since VS hooks an in-process compiler into the build.
You might be able to fix building by disabling in in process compiler but code completion will still be broken.
James, do you have the Visual Studio Async CTP (Version 3) - http://www.microsoft.com/en-us/download/details.aspx?id=9983 installed for VS2010?
Otherwise it may be as Michael suggests.
VS 2010 does not support Async, you need to use VS 2012.