I'm using your utility-library with latest Asp.Net Core 2.1 and get fatal error all time when start application. The problem with register IActionContextAccessor:
InvalidOperationException: Cannot consume scoped service 'Microsoft.AspNetCore.Mvc.Infrastructure.IActionContextAccessor'.
Because IActionContextAccessor should be resolving as Singleton like IHttpContextAccessor. Look this commit for services.AddHttpContextAccessor() method.
So it should be
services.TryAddSingleton<IActionContextAccessor, ActionContextAccessor>();
Hello!
I'm using your utility-library with latest Asp.Net Core 2.1 and get fatal error all time when start application. The problem with register IActionContextAccessor:
Because IActionContextAccessor should be resolving as Singleton like IHttpContextAccessor. Look this commit for services.AddHttpContextAccessor() method.
So it should be
services.TryAddSingleton<IActionContextAccessor, ActionContextAccessor>();