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?
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With