Publishing a Desktop Application in Light Switch Visual Studio 2012
This article describes how to perform hosting in a Desktop Application using LightSwitch Visual Studio 2012.
Procedure for publishing a Desktop Application
Step 1
- Open the Visual Studio 2012.
- Go to "File" => "New" => "Project..."
- In "New Project" => "Installed" => "Template"
- In "Template" => "LightSwitch"
- Select "LightSwitch Application (Visual C#)".
- Enter the name and choose the location.
- Click "OK".
Step 2
Go to the Solution Explorer, right-click on the "Data Source" and select "Add Table".
Step 3
Insert the data in the following table and rename it.
Step 4
Go to the Solution Explorer and right-click on "Screens" and select "Add Screen".
Step 5
The Screen Designer appears. Select the Screen Template and provide the screen information and click the "OK" button.
Step 6
Go to the Build Tab and choose the Configuration Manager.
Step 7
The Configuration Manager Designer window appears.
Step 8
Select "Release" from the "Active solution configuration" dropdown then click the "Close" button.
Step 9
Now, again go to the Build Tab and select the Publish (Application Name) option. Note that here our application name is Application6.
Step 10
We will notice that the LightSwitch Application Wizard appears.
Step 11
In the Application Type, we will select one application, either Web or Desktop Application. Here we will choose Desktop Application and click on "Next" button.
Step 12
In the Application Server Configuration, we will be asked to choose "Where the application's services will be hosted?" and we will choose Local and click on the "Next" button.
Step 13
In the Publish Output section we will need to specify the path under "Where do you want the application files to be placed?" and we also need to select the option from "How do you want to publish the default database?" and after selecting click on the "Next" button.
Step 14
In the Database Connections,we need to specify both user as well as administrator database connections, then click on the "Next" button.
Step 15
In order to specify the connection we click on the button, the connection property window appears. We also provide the username and word and enter the database name.
Step 16
We click on the Test Connection button to test the connection. We click the "OK" button.
Step 17
In the Prerequisites section, we will specify "whether the application have any additional dependencies that need to be installed?". We will choose "No, only install the prerequisites" then click on the "Next" button.
Step 18
In the "Specify a certificate" section, we are not specifying any certificate; click on the "Next" button.
Step 19
In the summary section, we will see the basic summary of our application and click on Publish button.
When we Publish we get: