RazorGenerator can't see custom cshtml helper

前端 未结 5 2154
小鲜肉
小鲜肉 2021-02-12 20:06

I\'m having a problem with RazorGenerator: it can\'t compile views that uses my custom helper:

App_Code/ViewHelper.cshtml

@helper test(System.Web.Mvc.Ht         


        
5条回答
  •  名媛妹妹
    2021-02-12 21:05

    Look at the actual cs-file generated in the obj\CodeGen folder for the helpers. It might be the class-name issue, so add this to the top of your helper cshtml-file:

    @* GeneratePrettyNames : true *@
    

提交回复
热议问题