Problem: Severity Code Description Project File Line Suppression State
Error The 'inject' directive expects an identifier.
Please 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?