2016-04-16 48 views
0

我正在使用Visual Studio 2015并尝试使用凉亭来安装资源时出现错误。Visual Studio 2015凉亭没有安装资源

这里是我的bower.json:

{ 
    "name": "ASP.NET", 
    "private": true, 
    "dependencies": { 
    "angular": "1.4.5", 
    "angular-resource": "1.4.5", 
    "angular-route": "1.4.5", 
    "jQuery": "2.1.4", 
    "bootstrap": "3.3.5" 
    } 
} 

这里是我的错误输出:

bower angular#1.4.5   not-cached https://github.com/angular/bower-angular.git#1.4.5 
bower angular#1.4.5   resolve https://github.com/angular/bower-angular.git#1.4.5 
bower angular-resource#1.4.5  not-cached https://github.com/angular/bower-angular-resource.git#1.4.5 
bower angular-resource#1.4.5   resolve https://github.com/angular/bower-angular-resource.git#1.4.5 
bower angular-route#1.4.5   not-cached https://github.com/angular/bower-angular-route.git#1.4.5 
bower angular-route#1.4.5    resolve https://github.com/angular/bower-angular-route.git#1.4.5 
bower bootstrap#3.3.5    not-cached https://github.com/twbs/bootstrap.git#3.3.5 
bower bootstrap#3.3.5     resolve https://github.com/twbs/bootstrap.git#3.3.5 
bower angular-resource#1.4.5   checkout v1.4.5 
bower angular#1.4.5     checkout v1.4.5 
bower angular-route#1.4.5   checkout v1.4.5 
bower bootstrap#3.3.5    checkout v3.3.5 
bower angular-resource#1.4.5   ECMDERR Failed to execute "git clone https://github.com/angular/bower-angular-resource.git -b v1.4.5 --progress . --depth 1", exit code of #-532462766 

的凉亭的目录设置要wwwroot的/ lib目录下。我被告知Visual Studio有一个错误,它会说Bower没有安装这些资源,但实际上它确实如此,但是我没有在wwwroot/lib文件夹中看到它们应该的资源,让我相信这不是同一个错误。

回答

0

这是我如何解决它:

  • 安装独立GIT中从http://git-scm.com/
  • 打开 bash和执行使用https上GIT中代替(防火墙也许阻断的git协议):

    git config --global url.https://github.com/.insteadOf git://github.com/

  • 现在只是配置 Visual Studio来代替使用这个新的git工具:

    enter image description here 添加的最后一行,并取消选中混帐老命令行。

希望这有助于