Bootstrap 4 个标签助手

Taghelpers with Bootstrap 4

我正在尝试将 Bootstrap 4 集成到我的应用程序中。在我的 _Layout.cshtml 文件中,我有以下内容:

<link asp-href-include="~/lib/bootstrap/dist/css/bootstrap.min.css" asp-href-exclude="**/*-reboot*,**/*-grid*" rel="stylesheet" />

我的 bower 配置文件:

{
  "name": "asp.net",
  "private": true,
  "dependencies": {
    "bootstrap": "~4.0.0"
  }
}

我的 _ViewImports.cshtml(在 /Views 文件夹中,而不是 /Views/Shared 文件夹中)有

@addTaghelper *, Microsoft.AspNetCore.Mvc.Taghelpers

我的 _ViewStart.cshtml 文件中有 _Layout.cshtml

bootstrap link 在使用 asp-href-includeasp-href-exclude taghelper 时似乎不起作用。 bootstrap 布局未应用。当我使用基本

<link href="~/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />

在我的 _Layout.cshtml 中应用了 Bootstrap 但不是我想要的布局。我怎样才能整合 taghelpers 以获得所需的设计?

愚蠢的错误,在 TagHelpers 中大写 "H" 修复了它

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers