gpt4 book ai didi

nuget - 无法将 bootstrap 4(测试版)nuget 包安装到 .Net MVC(.Net 版本 4.6.2)

转载 作者:行者123 更新时间:2023-12-03 21:23:28 25 4
gpt4 key购买 nike

我无法将 bootstrap 4(测试版)安装到我的 MVC 项目中。准确地说,popper.js nuget 依赖项无法安装。请让我知道任何可能的方法(凉亭安装仍然是一种方法,但我想使用 nuget)

Could not install package 'popper.js 1.11.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author

最佳答案

通过执行以下操作,我终于能够使 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"));

出于某种原因,如果您尝试在 \Scripts 的根目录中使用 popper.js文件夹,您将收到错误:
SyntaxError: export declarations may only appear at top level of a module

但版本在 /Scripts/umd似乎工作。

关于nuget - 无法将 bootstrap 4(测试版)nuget 包安装到 .Net MVC(.Net 版本 4.6.2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45666341/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com