Bug 14098 - Async support doesn't work on VS2010
Summary: Async support doesn't work on VS2010
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.3.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Dominique Louis
URL:
Depends on:
Blocks:
 
Reported: 2013-08-19 17:47 UTC by James Clancey
Modified: 2013-08-20 10:55 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description James Clancey 2013-08-19 17:47:50 UTC
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
}
Comment 1 Mikayla Hutchinson [MSFT] 2013-08-19 18:14:28 UTC
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.

<PropertyGroup Condition="'$(VisualStudioVersion)'=='10.0'">
    <UseHostCompilerIfAvailable>false</UseHostCompilerIfAvailable>
10.0
</PropertyGroup>
Comment 2 Dominique Louis 2013-08-20 05:46:16 UTC
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.
Comment 3 Miguel de Icaza [MSFT] 2013-08-20 10:55:31 UTC
VS 2010 does not support Async, you need to use VS 2012.