Areas' View Tag Helper Intellisense 在 Asp.Net Core VS2017 中没有用 [英] Areas' View Tag Helper Intellisense no use in Asp.Net Core VS2017

查看:46
本文介绍了Areas' View Tag Helper Intellisense 在 Asp.Net Core VS2017 中没有用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用了 asp.net core 的区域功能我用的是最新的vs2017.可以在正常的默认视图"文件夹中使用标签助手智能感知,但在区域视图中没有智能感知如何解决这个问题?

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?

推荐答案

只需在 cshtml 文件顶部添加以下代码:

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

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

或将_ViewImports.cshtml文件复制到区域的视图文件夹

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

这篇关于Areas' View Tag Helper Intellisense 在 Asp.Net Core VS2017 中没有用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆