Visual Studio 2015 Bower-未安装 [英] Visual Studio 2015 bower - not installed

查看:84
本文介绍了Visual Studio 2015 Bower-未安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Using a Empty Template in Visual Studio 2015, the following configuration fails to install dependencies.

{
  "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"
  }
}

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

我的同事也遇到了同样的问题。

My colleagues are running into the same problem.

这是一个已知问题吗?有没有解决的办法?我缺少什么?

Is this a Known issue? Is there a work around? What am I missing?

输出窗口中的错误是:

"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

所以我又一次在配置周围修改此错误。

So I got this error tinkering around the configs again.

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

ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/twbs/bootstrap.git", exit code of #128

推荐答案

我在VS 2015 RTM(不是RC)中遇到了类似的错误。
这个问题对我来说是这样的:

I ran into a similar error in VS 2015 RTM (not RC). This fixed for me:


  1. 安装 git工具(如果尚未安装) href = http://git-scm.com/download/win rel = nofollow noreferrer> http://git-scm.com/download/win

  2. 命令行中输入以下命令(如果未将git添加到PATH,则输入git bash): git config --global url。 http:// .insteadOf git://

  3. 在VS菜单中工具>选项..>项目和解决方案>外部Web工具

  4. 取消选中 $(DevEnvDir)\扩展名\Microsoft\Web工具\外部\git

  5. 添加 C:\Program Files(x86)\Git\bin

  1. Install git tools (if not already installed) from http://git-scm.com/download/win
  2. In the command line enter the following command(or git bash if you did not add git to your PATH): git config --global url."http://".insteadOf git://
  3. In VS menu Tools > Options.. > Projects and Solutions > External Web Tools
  4. Uncheck $(DevEnvDir)\Extensions\Microsoft\Web Tools\External\git
  5. Add C:\Program Files (x86)\Git\bin

希望这会有所帮助。

注意:我是在MVC 5网络应用程序上体验到的,而不是新的预览模板,但是我正在使用Gulp / Bower / NPM工具。

Note: that I experienced this on a MVC 5 web app, not the new preview template but I am using Gulp/Bower/NPM tooling.

更新1
尽管不是重复的情况,但错误消息是相似的。我想知道是否在Web应用程序模板中的某个位置进行了某些替代吗?如果是这样的话,那将是很好的发现。
VS 2015 + Bower:在防火墙后面不起作用

更新2
经过上述更改后,我在一个空项目中尝试过:
bower bootstrap#3.0 .0未缓存git://github.com/twbs/bootstrap.git#3.0.0
bower bootstrap#3.0.0解决git://github.com/twbs/bootstrap.git#3.0.0

UPDATE 2 I tried in an empty project after the above changes: 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

这篇关于Visual Studio 2015 Bower-未安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆