我想知道 Linux 上的 Mono 是否支持使用 async wait 关键字功能编写自托管 WebApi 项目。
然后有一些文字说有限的 ASP.NET 4.5 异步堆栈。
所以...我很困惑...Mono 4.5 支持或不支持什么异步/等待方面?
我正在使用 Visual Studio 2017 for Mac 在 Mono 中创建一个 ASP.Net MVC 项目。我添加了基本的控制器、视图、模型等,它运行良好。但是,一旦使 Index 方法异步,我就会收到以下错误:
System.InvalidOperationException
The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
Description: HTTP 500.Error processing request.
Run Code Online (Sandbox Code Playgroud)
这是代码:
public async Task<ActionResult> Index()
{
...
}
Run Code Online (Sandbox Code Playgroud)
搜索一些信息,我发现似乎 Mono 项目不支持异步管道(mono 未找到视图“索引”或其主视图)
在 Mono 项目网站 ( https://www.mono-project.com/docs/about-mono/compatibility/ ) 中,它按版本描述了不同的兼容性特征。
有谁知道在 Mono 中使用异步的任何解决方法?或者什么时候会支持?
谢谢