1

The procedure is supposed to be this way:

Right click on the project -> New element -> Select Bower configuration file

The problem is after picking New element I can't find Bower configuration file.

Even when I type "bower" in the search list i get nothing.

enter image description here

Ramil Aliyev 007
  • 4,437
  • 2
  • 31
  • 47
  • Possible duplicate of [How to use bower packages in Visual Studio 2017](https://stackoverflow.com/questions/45770536/how-to-use-bower-packages-in-visual-studio-2017) – Dawid Rutkowski Apr 03 '18 at 12:38

3 Answers3

3

Right click your project solution -> Add New Item -> select Web on the left -> select Bower Configuration File on the list -> Add

Now you can install new bower package by right click your solution -> manage bower package.

More Information

If above is not working :

Just add bower.json file to root of your project, you will see the Manage bower packages ... in the right click context of your web project. (even an empty file will work)

AmiNadimi
  • 5,129
  • 3
  • 39
  • 55
1

Open Visual Studio 2019 ---> Search ---> bower configuration file

0

In my case the file never appeared on the template list so I had to add a simple Text File and named it "bower.json" then add this code:

{ 
 "name": "asp.net",
  "private":  true,
  "dependencies": {
    "boostrap": "4.4.1" //This is for my project
  }
}

Then add another TextFile and named it ".bowerrc" and add the directory for the packages:

{
  "directory": "wwwroot/lib"
}

When I saved the files the Dependencies folder recognized it.