我无法将 bootstrap 4(测试版)安装到我的 MVC 项目中。准确地说,popper.js nuget 依赖项无法安装。请让我知道任何可能的方法(bower install 仍然是一种方法,但我想使用 nuget)
无法安装包“popper.js 1.11.0”。你正在尝试
将此包安装到目标项目中
'.NETFramework,Version=v4.6.2',但包中不包含任何
程序集引用或与其兼容的内容文件
框架。欲了解更多信息,请联系包作者
我终于能够通过执行以下操作让 Bootstrap 4-Beta 正常工作:
1.) 安装 popper.js NuGet 包 V1.12.3
2.) 安装 Bootstrap4-beta NuGet 包
3.) 更新您的BundleConfig.cs
包括以下内容:注意 popper.js 路径
bundles.Add(new ScriptBundle("~/Scrpts/Bootstrap").Include(
/*** Make sure popper.js is pointing to umd ***/
"~/Scripts/umd/popper.js",
"~/Scripts/bootstrap.js",
));
bundles.Add(new StyleBundle("~/CSS/Bootstrap").Include(
"~/Content/bootstrap.css"));
由于某种原因,如果您尝试在根目录中使用 popper.js\Scripts
文件夹中您将收到错误:
SyntaxError: export declarations may only appear at top level of a module
但其中的版本/Scripts/umd
似乎有效。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)