Problem: Severity Code Description Project File Line Suppression State
Error The 'inject' directive expects an identifier.
Login to See the Rest of the Answer
Answer: When developing in Asp.Net Core 3.1 and you try to inject a Service in the View, all of a sudden you see the Error "The 'inject' directive expects an identifier". Below is the solution:
@inject UserManager<YourService> //This is the wrong way to inject a dependency
@inject IViewLocalizer localizer //This is the correct way to inject a dependency?