Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Visual Studio 2015 and above automatic bower install on solution load?

Whenever I open the solution in Visual Studio 2015 or 2017 RC it starts automatically running bower install on one of the projects. The bower install output can be seen in the Bower/NPM output under the Output view:

PATH=X:\iis\wwwroot\LeExampleProjectName\.\node_modules\.bin;%PATH% "C:\Users\PC118\AppData\Roaming\npm\Bower.cmd" install --force-latest bower angular#1.3.14            cached git://github.com/angular/bower-angular.git#1.3.14 bower angular#1.3.14          validate 1.3.14 against git://github.com/angular/bower-angular.git#1.3.14 bower bootstrap#3.3.2           cached git://github.com/twbs/bootstrap.git#3.3.2 bower bootstrap#3.3.2         validate 3.3.2 against git://github.com/twbs/bootstrap.git#3.3.2 bower moment#~2.10.3            cached git://github.com/moment/moment.git#2.10.6 bower moment#~2.10.3          validate 2.10.6 against git://github.com/moment/moment.git#~2.10.3 bower angular-sanitize#1.3.14   cached git://github.com/angular/bower-angular-sanitize.git#1.3.14 bower angular-sanitize#1.3.14 validate 1.3.14 against git://github.com/angular/bower-angular-sanitize.git#1.3.14 bower lodash#3.3.1              cached git://github.com/lodash/lodash.git#3.3.1 bower lodash#3.3.1            validate 3.3.1 against git://github.com/lodash/lodash.git#3.3.1 bower angular-ui-select#~0.12.0 cached git://github.com/angular-ui/ui-select.git#0.12.1 bower angular-ui-select#~0.12.0         validate 0.12.1 against git://github.com/angular-ui/ui-select.git#~0.12.0 bower angular-animate#1.3.14              cached git://github.com/angular/bower-angular-animate.git#1.3.14 bower angular-animate#1.3.14            validate 1.3.14 against git://github.com/angular/bower-angular-animate.git#1.3.14 bower angular-strap#2.2.0                 cached git://github.com/mgcrea/angular-strap.git#2.2.0 bower angular-strap#2.2.0               validate 2.2.0 against git://github.com/mgcrea/angular-strap.git#2.2.0 bower selectize#0.8.5                     cached git://github.com/brianreavis/selectize.js.git#0.8.5 bower selectize#0.8.5                   validate 0.8.5 against git://github.com/brianreavis/selectize.js.git#0.8.5 bower microplugin#0.0.x                   cached git://github.com/brianreavis/microplugin.js.git#0.0.3 bower microplugin#0.0.x                 validate 0.0.3 against git://github.com/brianreavis/microplugin.js.git#0.0.x bower jquery#>=0.6.0                      cached git://github.com/jquery/jquery.git#2.1.4 bower jquery#>=0.6.0                    validate 2.1.4 against git://github.com/jquery/jquery.git#>=0.6.0 bower sifter#0.3.x                        cached git://github.com/brianreavis/sifter.js.git#0.3.4 bower sifter#0.3.x                      validate 0.3.4 against git://github.com/brianreavis/sifter.js.git#0.3.x bower jquery#>= 1.9.1                     cached git://github.com/jquery/jquery.git#2.1.4 bower jquery#>= 1.9.1                   validate 2.1.4 against git://github.com/jquery/jquery.git#>= 1.9.1 bower lodash#3.3.1                       install lodash#3.3.1 bower moment#~2.10.3                     install moment#2.10.6 bower angular-sanitize#1.3.14            install angular-sanitize#1.3.14 bower angular-ui-select#~0.12.0          install angular-ui-select#0.12.1 bower angular#1.3.14                     install angular#1.3.14 bower selectize#0.8.5                    install selectize#0.8.5 bower angular-animate#1.3.14             install angular-animate#1.3.14 bower microplugin#0.0.x                  install microplugin#0.0.3 bower sifter#0.3.x                       install sifter#0.3.4 bower angular-strap#2.2.0                install angular-strap#2.2.0 bower bootstrap#3.3.2                    install bootstrap#3.3.2 bower jquery#>= 1.9.1                    install jquery#2.1.4 lodash#3.3.1 bower_components\lodash moment#2.10.6 bower_components\moment angular-sanitize#1.3.14 bower_components\angular-sanitize └── angular#1.3.14 angular-ui-select#0.12.1 bower_components\angular-ui-select └── angular#1.3.14 angular#1.3.14 bower_components\angular selectize#0.8.5 bower_components\selectize ├── jquery#2.1.4 ├── microplugin#0.0.3 └── sifter#0.3.4 angular-animate#1.3.14 bower_components\angular-animate └── angular#1.3.14 microplugin#0.0.3 bower_components\microplugin sifter#0.3.4 bower_components\sifter angular-strap#2.2.0 bower_components\angular-strap └── angular#1.3.14 bootstrap#3.3.2 bower_components\bootstrap └── jquery#2.1.4 jquery#2.1.4 bower_components\jquery 

Is there a way to disable this automatic bower install? And other ways to configure it?

like image 294
Răzvan Flavius Panda Avatar asked Aug 12 '15 12:08

Răzvan Flavius Panda


2 Answers

In VS 2017 and newer you can go to:

Tools -> Options -> Projects and Solutions -> Web Package Management -> Package Restore 

And set to false the restores you do not want to happen on project open or save:

like image 165
Răzvan Flavius Panda Avatar answered Sep 29 '22 03:09

Răzvan Flavius Panda


It seems it is not possible to disable this for a specific solution or project, but here is how you can disable it globally:

  • In VS, go to Tools > Options > Projects and Solutions > External Web Tools
  • Disable all search paths, in my case there were four of them

Note that the output window may display some errors during solution loading. In my case it complained about gulp not being found. This has no negative effects, however.

All tools work as expected when called from the command line.

like image 23
theDmi Avatar answered Sep 29 '22 03:09

theDmi