Areas' View Tag Helper Intellisense no use in Asp.Net Core VS2017

情到浓时终转凉″ 提交于 2019-12-25 12:52:55

问题


I am using asp.net core 's Areas feature in my project I use the newest vs2017. It's fine to use the tag helper Intellisense in the normal default 'Views' folder,But no Intellisense in the areas' view How to solve this issue?


回答1:


just add this code at the top of the cshtml file:

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

or copy the _ViewImports.cshtml file to the area's view folder




回答2:


It now even works when adding it to _ViewImports.cshtml, so for example:

@using AmpTagHelpers @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper AmpTagHelpers.*, AmpPwaApps @addTagHelper MaterialTagHelpers.*, AmpPwaApps



来源:https://stackoverflow.com/questions/43269184/areas-view-tag-helper-intellisense-no-use-in-asp-net-core-vs2017

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