NuGet in Lightswitch 2012

Here we will learn how to add NuGet to our LightSwitch Application using Visual Studio 2012.

In my previous article I created the basic application; see: http://www.c-sharpcorner.com/UploadFile/18ddf7/add-and-edit-data-in-basic-lightswitch-application/.

Procedure for adding NuGet to our application.

Step 1

In the Solution Explorer, click on the Toggle View drop down list and select "File View".

file view.jpg

Step 2

Right-click on the HTML_App.HTML Client Project in the Solution Explorer and select Manage NuGet Packages...

manage nuget.jpg

Step 3

The Manage NuGet Packages dialog box appear. Select "Online packages" and in the Search box, search for SignalR.

online.jpg

Step 4

Install the Microsoft ASP.Net SignalR JavaScript Client.

search signalR.jpg

Step 5

The SignalR JavaScript is added to the HTML Client.

default.htm.jpg

Step 6

Now open the default.htm file and add the following code.

<script type="text/javascript" src="Scripts/jquery.signalR-1.0.1.js"></script> //It is the reference to SignalR Library
  <script src="../signalr/hubs"></script>     //It is the reference to Java Script Library

Step 7

Right-click on the server project and select "Manage NuGet Package..." as shown below.

html app server right click.jpg

Step 8

This time we need to install Microsoft ASP.NET SignalR.

microsoft signalR asp.net.jpg


Similar Articles