问题
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