简体   繁体   中英

Async/await in PCL Profile 158 targeting Android and IOS too

I have a PCL Profile 158 with Android and IOS. I also want to use async/await. I find some solutions for this problem, but I can't got it working.

When I try to use await, visual/xamarin studio shows an error saying: Type 'System.Threading.Tasks.Task<...>' is not awaitable.

Is there any way to get it working or an alternative to use async/await operations?

Did you also install the nuget package for Microsoft.Bcl.Async? I think you need that to get async/await in a PCL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM