Working With Google Chrome Extension in Visual Studio 2013

Introduction

In this article you'll learn to create a Google Chrome Extension in Visual Studio 2013. We can build the extension in Visual Studio and use the extension in the Chrome's developers mode.

In that context you'll learn to create the Chrome Extension in Visual Studio, to work with the JavaScript intellisense in Chrome here. So, let's proceed with the following.

  • Creating Chrome Extension
  • Working with Chrome Extension
  • Intellisense in JavaScript

Prerequisites

In the following screenshot you can see that the extension is not available in Visual Studio. So we need to download the extension for Visual Studio.

Create ASP.NET Web App

After download, install the Extension Installer and restart Visual Studio.

Create Chrome Extension

In this section we'll create the Chrome Extension in Visual Studio 2013 using the following procedure.

Step 1: Open Visual Studio 2013.

Step 2: Click on "New Project" and select the SideWaffle on the left pane to choose the Google Chrome Extension and enter the name for the extension, like Kitties.

Create Chrome Extension in VS 2013

Step 3: You can check what files and folders are automatically created in the project as shown below:

Solution Explorer of Chrome Extension

Working with Chrome Extension

Step 1: Open the Google Chrome and in the Address bar enter the following URL:

Chrome://Extensions/

Step 2: Now you can see that the Developer mode is unchecked, check this checkbox as in the following:

Developer Mode in Chrome Extension

Step 3: Now click on the "Load unpacked extension" button.

Loading Unpack Extension

Step 4: Go to the project location in the computer and select the app.

Select App Extention in Chrome

Step 5: Close Chrome and debug the project in the Chrome browser.

App Debugging with Google Chrome

Step 6: Now you can see the extension link in your Chrome.

Chrome Extension Page

Step 7: Click on that icon and you can see that various images will open.

Chrome Extension Page with app

Step 8: Open the project location in the computer and you can see that in the bin folder the app rar file is generated.

Location of App

Intellisense in JavaScript

You can see the intellisense in the app/popup.js file:

Intellisense in JavaScript

Summary

This article describe how to create a Google Chrome Extension in a website using Visual Studio 2013 to enable the extension in Chrome. Thanks for reading.


Similar Articles