Visual Studio 2015 bower - 未安装

kan*_*irk 8 bower visual-studio-2015

在Visual Studio 2015中使用空模板,以下配置无法安装依赖项.

{
  "name": "ASP.NET",
  "private": true,
  "dependencies": {
    "bootstrap": "3.0.0",
    "bootstrap-touch-carousel": "0.8.0",
    "hammer.js": "2.0.4",
    "jquery": "2.1.4",
    "jquery-validation": "1.11.1",
    "jquery-validation-unobtrusive": "3.2.2"
  }
}
Run Code Online (Sandbox Code Playgroud)

虽然ASP.NET中的Web应用程序示例模板的相同配置成功完成.

我的同事遇到了同样的问题.

这是一个已知的问题?有工作吗?我错过了什么?

输出窗口中的错误是:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\Bower.cmd" install --force-latest
bower bootstrap#3.0.0        ENOTFOUND Request to https://bower.herokuapp.com/packages/bootstrap failed: getaddrinfo ENOTFOUND
Run Code Online (Sandbox Code Playgroud)

所以我得到了这个错误再次修补配置.

ECMDERR无法执行"git ls-remote --tags --heads https://github.com/twbs/bootstrap.git ",退出代码为#128

Dev*_*iss 19

我在VS 2015 RTM(而不是RC)中遇到了类似的错误.这对我来说是固定的:

  1. http://git-scm.com/download/win 安装 git工具(如果尚未安装)
  2. 命令行中输入以下命令(如果没有将git添加到PATH,则输入git bash):git config --global url."http://".insteadOf git://
  3. 在VS菜单工具>选项..>项目和解决方案>外部Web工具中
  4. 取消选中 $(DevEnvDir)\ Extensions\Microsoft\Web Tools\External\git
  5. 添加 C:\ Program Files(x86)\ Git\bin

希望这可以帮助.

注意:我在MVC 5 Web应用程序上遇到过这种情况,而不是新的预览模板,但我使用的是Gulp/Bower/NPM工具.

更新1 尽管不是重复方案,但错误消息类似.我想知道是否在某个地方的Web应用程序模板中完成了一些覆盖?如果那样的话就好了. VS 2015 + Bower:在防火墙后面不起作用

更新2 我在上述更改后尝试了一个空项目:bower bootstrap#3.0.0 not-cached git://github.com/twbs/bootstrap.git#3.0.0 bower bootstrap#3.0.0 resolve git:// github.com/twbs/bootstrap.git#3.0.0

  • 我会保持到星期五;) (2认同)

Van*_*ine 16

这是一个错误.展开wwwroot/lib文件夹,很明显实际上已加载了包.关闭/重新打开项目,一切顺利.我们从您的报告中打开了一个错误.感谢您对问题的可操作描述,对此体验感到抱歉.