简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM