Reputation: 425
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
: error CS1026: ) expected : error CS1002: ; expected : error CS1513: } expected
On the line
if (context.Items[typeof(IServiceScope)] is IServiceScope scope)
But I don't see where it's throwing the error.
Upvotes: 1
Views: 886
Reputation: 425
It helped to update "Microsoft.Net.Compilers" over Nuget
now it builds without error.
Upvotes: 1