ASP Core .NET 6 MVC asp- TagHelpers not working

I’m working on a project. Converting a Core 2.1 to .NET 6. It’s going pretty well. I noticed that taghelpers are not working. We use a lot of Anchor tags. Every time I search it comes up that I need to add the line

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

to my _ViewImports.cshtml. But it is in there and always has been. Intellisense doesn’t recognize the taghelpers either. According to the .net6 documentation it is still part of .NET 6. When I check the Nuget packages I can install Microsoft.AspNetCore.Mvc.TagHelpers but it has a .NET version of 2.0. So I doubt I should install that.

Any idea’s how to get these taghelpers working again?

>Solution :

We’re using Microsoft.AspNetCore.Mvc.TagHelpers 2.2 and they work fine. The package has a NETStandard library. This means its backwards compatible.

>= 2.2.0 means any version above 2.2.0

Leave a Reply