Mono .Net support for async await?

2019-06-28 04:50发布

问题:

I wanted to know if writing a self hosted WebApi project using async await keyword features would be supported in Mono on Linux..

I found this: on the Mono website on the compability page:

and then there is some text saying limited ASP.NET 4.5 async stack.

So... i'm confused... what async/await aspect is or isn't supported with Mono 4.5 ?

回答1:

Mono cloned ASP.NET 2 pipeline a long time ago, to support the classic ASP.NET WebForms based on "System.Web" assembly. That model was a sync one due to Microsoft's initial design.

However, later Microsoft added many async features to the pipeline (System.Web) during .NET 4/4.5 time frame, and that's a new design Mono does not yet fully clone. That's probably the meaning behind the paragraph.

I don't think Mono should move ahead with "System.Web" as even Microsoft gives it up in favor of OWIN a while ago, and now ASP.NET 5/DNX.

Update:

Please switch to ASP.NET Core today, as it is simply the best in this field for cross platform web applications.