Visual Studio .net core tag helpers not working

后端 未结 9 2479
暗喜
暗喜 2021-02-19 00:49

Well, lets get down to it. I\'m using Visual Studio 2015 and ASP.NET core tag helpers have completely stopped working, no idea why as I\'ve not changed anything. I was in work o

9条回答
  •  情歌与酒
    2021-02-19 01:20

    For anyone meet the same problem, please check the location of the _ViewImports.cshtml, It must be in the same folder of your Views. For example, I have created a project that already have the _ViewImports.cshtml file in Pages folder, but I create and use my view files located in another folder, so ASP.NET can't find the _ViewImports.cshtml for our views.

    With anyone have issue finding the project.json, you can right click at the project and choose Manage Nuget Packages then install the Microsoft.AspNetCore.Mvc.TagHelpers.

    Hope these advices can help everyone.

提交回复
热议问题