Chapter 34. Visual Studio LightSwitch

Visual Studio LightSwitch is a development tool that has been covered in depth throughout this book, but we have not yet discussed its installation requirements or how to host the developed code and make it available to the users.

In this chapter, we will:

This section will walk through the end user experience for installing Visual Studio LightSwitch on a developer’s system.

Skipping ahead and assuming that you have met the minimum system requirements for LightSwitch it is time to begin the installation. After initial download or media insertion, launch the installer and read the End User License Agreement.

What follows is a very simple installation process, regardless of the custom options that we have opted not to interact with for the purposes of this book due to the requirements being met by the standard installation. A very friendly install option is prominent on the screen and will allow you to proceed with the installation, as seen in Figure 34-1.

As stated previously, the basic installation requires 4.4GB of hard drive space. Once the installation has begun, the following components will be installed:

During this installation process, LightSwitch will attempt to go out to the Web and pull in updates to these packages and run the installation automatically. Once complete, your development environment is ready for use, as seen in Figure 34-2.

LightSwitch code can be deployed either to Azure or on premises. When deploying on premises, it is key to understand the architecture to which you are deploying. LightSwitch does not require its own server and can be implemented alongside SharePoint on the same servers. The caveat to this is that LightSwitch should be deployed in its own standalone web application. It is technically feasible to run them together, though it is not recommended. As long as you have the prerequisites installed and keep the web applications and app pools separated, the LightSwitch server-side code implementations will be straightforward.

Microsoft took an enormous step forward when they implemented the individual worker processes in IIS 7.0 and since that time has been making strides to ensure that IIS is able to be configured as optimally as possible. In IIS 7.0, we first saw the Features View and Content View, which allow us to be more granular when configuring a system.

In an effort to continuously improve the ITPro experience with IIS, on January 21, 2009 Microsoft released the first version of the Microsoft Web Platform Installer (Web PI). The goal of Web PI is to make installation of ASP.NET environmental development tools and web platforms as easy as possible.

The latest version of Web PI delivers on this promise and has made the installation of the LightSwitch Application Services extremely straightforward. The download of the most up-to-date version can be found at http://www.iis.net/webpi, however for this book we have opted to utilize version 3.0.

Once you have completed the download of Web PI, open the package and locate the appropriate version of the server runtime component. For our scenario, we chose the Visual Studio LightSwitch 2011 Server Runtime without Local SQL option as seen in Figure 34-3.

This will install (if not already there):

The key in our scenario was running the “without Local SQL” option to keep Web PI from installing SQL Express on the application server as we already have a SQL Server environment. Once you add the Visual Studio LightSwitch 2011 Server Runtime without Local SQL option, you will be prompted with information about all of the components that are being installed as a part of Web PI (listed previously).

Upon accepting (seen in Figure 34-4), the installation will kick off and complete in relatively short order. At this point, you will now be able to host LightSwitch applications on this application server (Figure 34-5).

Once this installation has completed successfully, the developer is ready to begin working with the scenarios covered in this book.

In this chapter, we explained the Microsoft minimum requirements for running Visual Studio LightSwitch, gave you experiential recommendations for Visual Studio LightSwitch requirements, and walked through the client-side installation of Visual Studio LightSwitch including the detailed prerequisites. We also explained the server-side implementation of Visual Studio LightSwitch code, walked through an installation of Visual Studio LightSwitch server-side extensions, and explained changes to Visual Studio 2012 server-side requirements.