There's actually an upstream bug in Roslyn related to compiling projects that include async partial
methods that's causing this.
Public bug 56246 on the Xamarin bug tracker has been filed to track the inclusion of the upstream "csc.exe" fix into Mono 5.0.
Mono 5.0 and Mono 4.8.1 both include mcs (Mono's compiler) and csc, however, Mono 4.8.1 uses mcs by default while 5.0 uses csc by default.
While waiting for the fix to make it to the Xamarin environment, there is a temporary workaround that should get you up and running. You can temporarily switch back to using mcs and xbuild in Mono 5.0:
Add the following PropertyGroup
element to the bottom of the .csproj file for your app project just before the closing </Project>
tag:
<PropertyGroup Condition=" '$(OS)' == 'Unix' ">
<CscToolExe>mcs.exe</CscToolExe>
</PropertyGroup>
Disable Visual Studio > Preferences > Build > Build with MSBuild instead of xbuild
.
Close, then reopen the solution and double check the new setting.
Clean and rebuild.