有人知道如何将依赖项更新到最新版本吗?
我使用默认的 MVC ASP.NET 5 模板创建了一个 Web 应用程序。它使用 Bootstrap 3.0.0,但我希望它(与其他软件包一起)更新为最新版本。 Bootstrap的当前版本是3.3.5,但是当我右键单击bower> bootstrap依赖项并选择“更新包”时,我无法更新包。 Bower/NPM 的输出窗口显示了以下内容:
PATH=D:\Documents\Visual Studio 2015\Projects\iKnow\src\iKnow\.\node_modules\.bin;D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
"D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\Bower.cmd" update bootstrap --force-latest --production
bower bootstrap#3.0.0 cached git://github.com/twbs/bootstrap.git#3.0.0
bower bootstrap#3.0.0 validate 3.0.0 against git://github.com/twbs/bootstrap.git#3.0.0
PATH=D:\Documents\Visual Studio 2015\Projects\iKnow\src\iKnow\.\node_modules\.bin;D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
"D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\Bower.cmd" update bootstrap --force-latest --production
bower bootstrap#3.0.0 cached git://github.com/twbs/bootstrap.git#3.0.0
bower bootstrap#3.0.0 validate 3.0.0 against git://github.com/twbs/bootstrap.git#3.0.0
只需打开文件“bower.json”并更改此行:
"bootstrap": "3.0.0",
...至:
"bootstrap": "3.3.5",
...并关闭文件。 Bootstrap 将自动更新。
还要在 _Layout.cshtml 中搜索 bootstrap/3.0.0 并在那里进行更改(两个地方。)