This is the tenth part of the 11 series LightSwitch tutorial. In this part we will learn about how to Publish LightSwitch Application as Desktop Application
Table of Content
- Aim of the article
- Steps to Publish LightSwitch Application as Desktop Application
Rapid business application development is a need of today’s business and keeping that in focus software stewards wants to build the 3 tire applications at a lightning speed where there will be less code, less time will be spent on designing the UI screens , the BAL layer and DAL layer. By keeping all these into focus, on 26th July, 2011, Microsoft has released their new product – LightSwitch.
It is the simplest way for developers of all skill levels to develop business applications for the desktop as well as for cloud. This is the tenth part of the series of 12 LightSwitch tutorials where we will look into how to Publish LightSwitch Application as Desktop Application.
You can read the other parts of the LightSwitch tutorial as under
- Part 1: Introduction to Light Switch
- Part 2: Rapport with New Data Screen
- Part 3: Rapport with Search Data Screen
- Part 4: Rapport with Editable Grid Screen
- Part 5: Rapport with List and Details Screen
- Part 6: Rapport with Details Screen
- Part 7: Rapport with External Data Source – Database
- Part 8: Rapport with External Data Source – WCF RIA Service
- Part 9:Using a custom control in LightSwitch
- Part 10: Publish LightSwitch Application as Desktop application and host in local system
- Part 11: Publish LightSwitch Application as Web application
The article assumes that, we have LightSwitch 2011 installed in our system
Now that we have seen how to build the various screens, using user control in our LightSwitch application, now we can go ahead for the deployment operations.We can host on the LightSwitch applications on the desktop, on a remote IIS Server or in Azure.In this article we will look into how to perform the hosting in a desktop.
Step1:From Visual Studio, first choose Configuration Manager from Build tab
Step 2: The Configuration Manager window appears.From the "Active solution configuration" dropdown, choose "Release". And then click on "Close" button.
Step 3: Next, again go to the Build tab and choose Publish <Project Name>. Note that our LightSwitch Project name is Application1.So we are choosing Publish Application1
Step 4: The LightSwitch Publish Application Wizard will appear with 8 steps.
- Client Configuration
- Application Server Configuration
- Publish Output
- Database Connections
- Other Connections
- Specify a certificate
In the Client Configuration, we have to option to choose as how the LightSwitch Application will be deployed viz. Desktop or Web.We will choose the Desktop option and click on "Next" button.
Step 5: Now we are in the Application Server Configuration section. In this section, we will be asked as where the application will be hosted viz. Local, IIS or Windows Azure. We will choose Local and click "Next" button to proceed further.
Step 6: Now we are in the Publish Output section. In this section, we need to specify the path where our deployment files will be placed. Also we need to select as how to publish the database scripts/objects etc. We will go with the default one i.e. "Publish directly to the database now".Click "Next" button to proceed further.
Step 7: Now we are in the Database Connections section. In this section,we need to speficy the administrator and user database connections and click on "Next" button.
Step 8: Now we are in the Prerequisite section. In this section, we need to specify if the application needs any addition resource at the time of installation. We will choose the default option "No, only install the prerequisites" and click "Next" button for the next screen.
Step 9: Now we are in the Other Connections section. In this section, we need to speficy if our data comes from any other sources or not. Then click "Next" button.
Step 10: We are now in the "Specify a certificate" screen. If we need to add any certificate for adding a Xap file, we need to do so here. In our case, we can leave it as default and click on the "Next" button to proceed further
Step 11: Now we are in the "Summary" screen which gives a basic summary of our application.Next click on the "Publish" button
If every thing goes smooth, we will get "Publish succeed" message
We can find the application deployed in the specified folder
Click on the "setup.exe" and run in the Administrator mode
The application install screen will will appear and click on the "Install" button
The application will be installed in our local system.
So in this part we have learn about how to Publish LightSwitch Application as Desktop Application and host the same in local system.In the next article we will look into how to host LightSwitch Application in IIS.
Thanks for reading the article.Happy lightning with LightSwitch.