Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 (ASP.NET 5): show 'Manage Bower Packages...' context menu

In Visual Studio 2015, when I create a brand new solution with a brand new ASP.NET 5 project, I see the Manage Bower Packages... context menu when I right-click on the project:

enter image description here

However, when I add an ASP.NET 5 project to an existing solution, the Manage Bower Packages... context menu is nowhere to be seen:

enter image description here

Any idea how to get the Manage Bower Packages... context menu option to appear?

like image 258
Johnny Oshika Avatar asked Jan 22 '16 00:01

Johnny Oshika


2 Answers

Adding a Bower configuration file to the project solves this problem. This can be done by right-clicking the project, selecting "Add new item" from the menu and then "Bower configuration file" from the item templates. Visual Studio restart may be required to get the menu item to show up.

like image 118
Samuli Haverinen Avatar answered Oct 15 '22 01:10

Samuli Haverinen


I'm using Visual Studio 2017 Community version 15.7.0. I'm working on a .NET Core 2 project. I don't see the Bower Configuration file item at all in the Add New Item wizard suggested by @Samuli in his answer. Look at the the screenshot below:

enter image description here

Solution 1 - I went into the root directory of the project from windows explorer and created an empty bower.json file myself. After doing this, I came back to Visual Studio and right clicked the project file in solution explorer and I was all set. Manage Bower Packages... option was available now in the context menu.

Solution 2 - If you want a non-empty bower configuration file with default configuration then follow these steps :

  1. Open the command/shell prompt or power shell prompt
  2. Change the current working directory in the shell prompt to project's root directory
  3. Run the command bower init on shell prompt
  4. You would get bower.json created by answering few general answers on the shell prompt.
like image 44
RBT Avatar answered Oct 15 '22 02:10

RBT