private void Context_EndRequest(object sender, EventArgs e)
{
var context = ((HttpApplication)sender).Context;
if (context.Items[typeof(IServiceScope)] is IServiceScope scope)
{
scope.Dispose();
}
}
当我试图构建我的项目(Framework4.7.2)时,我得到的是
错误CS1026:)预期:错误CS1002:;预期:错误CS1513:}期望值
在线上
if (context.Items[typeof(IServiceScope)] is IServiceScope scope)
但我看不出它是在哪里抛出错误。
发布于 2019-08-09 13:36:57
它有助于在Nuget上更新"Microsoft.Net.Compilers“。
现在它的构建没有错误。
https://stackoverflow.com/questions/57430749
复制相似问题