Custom tag helper not working

前端 未结 8 1487
抹茶落季
抹茶落季 2021-02-03 19:11

I followed a few guides on creating a custom tag helper for ASP Core.

This is my helper:

using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.Asp         


        
8条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-03 19:43

    I had the same problem, but it was the result of a rogue, accidental semi-colon at the end of the @addTagHelper line.

    I had:

    @addTagHelper *, ToolConstrolSystem;

    Instead of:

    @addTagHelper *, ToolConstrolSystem

    While the solution will build and run fine, the tag helper will not work if the @addTagHelper line contains a semi-colon.

提交回复
热议问题