
As the complexity of my web project grew, I realized that loading external JavaScript libraries manually was error prone, time-consuming, and made the project less maintainable over time.
Although Visual Studio has a NuGet package manager, it is not as powerful as a gazebo. Also, not all external libraries are released on NuGet.
So, I decided to take a decisive step and start with a gazebo.
My project structure is now much cleaner and easier to maintain.
Here I list the steps that we must follow to set up a conversation with Visual Studio.
Detailed instructions for using the gazebo are already available at http://bower.io/#install-bower . Here I will list the steps that I have taken for
Bower requires node, npm, and git for windows.
Before you begin, set the following
Step 1
Open a command prompt and run the command
npm install -g bower

The above step may fail if you are behind a corporate proxy server. Add proxy server to npm, run the following 2 commands from the command line
npm config set proxy http://proxy.myCompany.com:80
npm config set https-proxy http://proxy.myCompany.com:80
After execution, try installing bower again
Step # 2
Go to the Visual Studio Project folder from the command line.
Run command
bower init

- Include this file in your Visual Studio project. You may have to click on โShow all filesโ in the โSolution Explorerโ menu.

Step # 3
Create a .bowerrc file using notepad with the following configuration and save it in the Project Visual Studio folder
{ "directory": "scripts/bower_components", "proxy":"http://proxy.myCompany.com:80", "https-proxy":"http://proxy.myCompany.com:80" }
- Include this file in your Visual Studio project.
- Edit this file to set the directory for packages to be downloaded
- Add proxy settings if you are working with a corporate proxy. Else delete last 2 lines for proxy and https proxy

Step # 4
To load AngularJs, run the command
bower install angular โsave
This will add a line to bower.json.

Step number 5
The package will be downloaded from the bower_components directory by default. (or in the directory specified in the .bowerrc file)
Make the entire package directory run in a Visual Studio project.
- Click Show All Files
- Right-click the new downloaded package and click "Include in Project"


Step # 6
Finally add a link to the new package to your index.html
