Visual Studio 2015 restore package in Bower does nothing
Solution 1
Thomas is correct! I ran into the same problem and found that you need to use your Grunt File to run the Bower task. For example, right-click on your Grunt file and choose Task Runner Explorer
Next, right-click on the Bower task and Run.
Once the task is finished running, you will notice the packages have been copied to your wwwroot.
Solution 2
The package files are installed into a folder called "bower_components" in your project directory. The folder is hidden in the Visual Studio solution explorer. It's meant to be a cache of downloaded package files.
Typically you would setup grunt or gulp tasks to copy or process only the files you need from the package to somewhere under wwwroot.
For example if you install bootstrap using bower you might setup a task to compile and concat the LESS source files with your app's LESS files, or alternatively you might just setup a task to copy the pre-compiled .css files from the bower_components\bootstrap\dest folder.
This post shows how to use bower and grunt together. http://www.asp.net/vnext/overview/aspnet-vnext/grunt-and-bower-in-visual-studio-2015
Solution 3
On vs 2015 go >Tools>Options>Projects and Solutions>External Web Tools Make sure $(DevEnvDir)\Extensions\Microsoft\Web Tools\External\git checked If you didn't find it, add it
:) close vs2015 n open it, then restoring process will success
Solution 4
Those who are having trouble to use bower in ASP.NET Core 1.0. Please check this out. The problem is due to Git installation path.
girlcode
Updated on June 07, 2022Comments
-
girlcode almost 2 years
In Visual Studio 2015, I've added, for example, "angular" as a dependency in bower.json. When I go into Dependencies -> Bower I see angular in the list except it says not installed next to it. Right-clicking on Bower and clicking "Restore packages" removes the "not installed" next to angular, however I don't actually have any angular files added to my wwwroot. Am I missing an extra step here?
-
fiat almost 9 yearsTo save manual running, bind to a Visual Studio event: docs.asp.net/en/latest/client-side/…
-
Mihai Bratulescu over 8 yearsI don't have grunt i have gulp and no bower task. What can I do?
-
Fernando de Bem almost 8 yearsThanks! One day trying to solve things with ASP.Net Core 1.0. Bypassing version check in the installer... Reinstalling NuGet... And now this... I hope I can start working now.
-
Hassan Abbas over 7 years'gulp' is not recognized as an internal or external command, when i run task on bower