No service for type 'Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer' has been registered. code example
Example: No service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor' has been registered
services.AddHttpContextAccessor();
services.AddHttpContextAccessor();