Inside my ASP.NET Core application I created a custom ViewComponent that could be used to log out a user. To make my life a little bit easier I used an ASP.NET Core TagHelper inside my component:
Unfortunately this didn’t work and instead of parsing the custom tags the TagHelpers were rendered ‘as-is’ in the HTML output:
To fix it I had to explicitly include the TagHelpers inside my ViewComponent using @addTagHelper:
@using ViewComponents.Logout
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers