LightSwitch Extensibility Toolkit for Visual Studio 2013

Visual Studio Lightwitch is a tool for developing business applications for the desktop, web, and cloud. You can extend the functionality of LightSwitch by creating extensions using Visual Studio 2013 Professional, the Visual Studio 2013 SDK, and the LightSwitch Extensibility Toolkit for Visual Studio 2013.

The following are required in order to create LightSwitch extensions:

  • Visual Studio 2013 Professional

  • Visual Studio 2013 SDK

  • LightSwitch Extensibility Toolkit for Visual Studio 2013

In addition to these prerequisites, you should be proficient in either Visual Basic or C# and should be familiar with both Windows Presentation Foundation (WPF) and Silverlight. We also recommend that you be familiar with creating Visual Studio extensions using the Visual Studio SDK.

There are six types of extensions for LightSwitch:

  • Business types

    Let you wrap a base data type in a semantic type, providing additional validation and display capabilities in LightSwitch while continuing to store the data in its underlying type. They can include a Silverlight control for displaying data.

  • Custom controls

    Silverlight user controls with additional attributes to make them usable in and better integrated with LightSwitch.

  • Data sources

    Domain service adapter class that enables LightSwitch to work with other data sources.

  • Screen templates

    Can be used to create Silverlight or HTML client screens that have common layout patterns different from the standard screen layouts provided by LightSwitch.

  • Shells

    Let you create an application shell with a different layout and different capabilities than the standard LightSwitch application shell.

  • Themes

    Let you create a different appearance and behavior for LightSwitch applications and controls.

The LightSwitch Extensibility Toolkit for Visual Studio 2013 includes templates that contain the necessary files for each extension type.

The LightSwitch Extensibility Toolkit for Visual Studio 2013 installs two new project templates, LightSwitch Extension Library (Visual Basic) and LightSwitch Extension Library (Visual C#), that can be used to create extensions. When you select one of these project types, a solution with seven projects is generated:

  • The projects with names that end in .Client, .Client.Design, .Common, .Design, and .Server contain the various parts of the extension items that will be added to the library.

    Content ​project


    Referenced by​


    Contains client implementations that should be deployed with a LightSwitch application but are not found in the Common project. For example, controls, shells, and themes.

    Client sub-project


    Contains implementations necessary during the debugging of a LightSwitch application. For example, control images or custom property editors for the runtime screen designer.

    Client sub-project


    Contains ​implementations that are common to both the client and the server. For example, metadata loaders and validators.

    Client sub-project, server sub-project, Visual Studio IDE


    Contains implementations for design time integrated development environment (IDE) operations. For example, a screen template.

    Visual Studio IDE


    Contains server implementations that should be deployed with a LightSwitch application but are not found in the Common project. For example, data sources.​

    Server sub-project

  • The .Lspkg project packages the previous five projects so that LightSwitch can unpack and reference them when the package is installed.

  • The .Vsix project packages the generated .Lspkg file into a .Vsix package so that it can be added to LightSwitch through the Extension Manager.

The contents of each project will differ depending on which extension type template is selected. To learn more about how to create extensibility projects, see How to: Create a LightSwitch Extension Project

The process of developing a LightSwitch extension is like that of developing a Visual Studio extension using the LightSwitch. As with any extension, you create an extensibility project, write code for the extension, debug the extension, set properties for the .Vsix package, and distribute the extension.

The actual code that you have to write will vary depending on the extension type. To start working with a particular extension type, see one of the following topics:

As with any Visual Studio extension, you debug a LightSwitch extension by using an experimental instance of Visual Studio. To learn more about how to debug, see How to: Debug or Test a LightSwitch Extension.

Once your extension is complete, you will want to set properties in the .Vsix package to identify the extension. For more information, see How to: Set VSIX Package Properties. The final step is to publish your extension on Visual Studio Gallery. For more information, see How to: Distribute a LightSwitch Extension.