after adding @addTagHelper to the *.cshtml file. error 500 is shown

对着背影说爱祢 提交于 2020-01-06 20:19:35

问题


When I Use

@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"

in My .cshtml file it causes error 500. but it's work in another ViewComponent


回答1:


which version? please give us more information. if you are using rc1-update1 use @addTagHelper *, Microsoft.AspNet.Mvc.TagHelpers




回答2:


I had the same problem and couldn't figure out the exact cause. However, changing the "Microsoft.AspNet.Mvc.TagHelpers" depencency in my json file from "6.0.0-betaX" to "6.0.0-rc1-final" fixed the issue. Make sure to restore packages after this change.

Also: as suggested the @TagHelper statement should go to your _viewImports.cshtml file.



来源:https://stackoverflow.com/questions/35360005/after-adding-addtaghelper-to-the-cshtml-file-error-500-is-shown

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!