2016-04-16 46 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 添加的最後一行,並取消選中混帳老命令行。

希望這有助於