after adding @addTagHelper to the *.cshtml file. e

2019-09-13 03:00发布

When I Use

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

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

2条回答
够拽才男人
2楼-- · 2019-09-13 03:16

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.

查看更多
对你真心纯属浪费
3楼-- · 2019-09-13 03:28

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

查看更多
登录 后发表回答