[英]CS1026: ) Expected | CS1002: ; expected | CS1513: } expected
private void Context_EndRequest(object sender, EventArgs e)
{
var context = ((HttpApplication)sender).Context;
if (context.Items[typeof(IServiceScope)] is IServiceScope scope)
{
scope.Dispose();
}
}
When I try to build my project ( Framework 4.7.2 ) I am getting the 当我尝试构建我的项目( 框架4.7.2 )时,我正在
: error CS1026: ) expected : error CS1002: ; :错误CS1026:)预期:错误CS1002:; expected : error CS1513: } expected 预期:错误CS1513:}预期
On the line 在线上
if (context.Items[typeof(IServiceScope)] is IServiceScope scope)
But I don't see where it's throwing the error. 但是我看不到它在哪里引发错误。
It helped to update "Microsoft.Net.Compilers" over Nuget 它有助于通过Nuget更新“ Microsoft.Net.Compilers”
now it builds without error. 现在,它的构建没有错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.