The @addTagHelper directive registers custom Tag Helpers for use in Razor views, partial views, and layouts. Place it in _ViewImports.cshtml so the registration applies throughout the relevant Razor files. section 32.1.1
Choose the registration form that matches the scope you need:
- Register one Tag Helper by specifying its fully qualified type and assembly: @addTagHelper CustomTagHelpers.SystemInfoTagHelper, CustomTagHelpers. section 32.1.1
- Register every Tag Helper in an assembly with wildcard syntax: @addTagHelper *, CustomTagHelpers. section 32.1.1
- If IntelliSense is missing or Tag Helpers do not appear with Visual Studio’s Tag Helper styling, check the _ViewImports.cshtml registration. section 32.1.1
Registering custom Tag Helpers
A custom SystemInfoTagHelper can be made available with an explicit registration: @addTagHelper CustomTagHelpers.SystemInfoTagHelper, CustomTagHelpers. A wildcard registration instead enables all Tag Helpers from that assembly. After registration, Razor markup such as <system-info></system-info> can use the helper. section 32.1.1 section 32.1.2
