Part 10/11: Publish LightSwitch Application as Desktop application and host in local system

Niladri.biswas
Posted by in LightSwitch category on for Beginner level | Points: 250 | Views : 14705 red flag

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

  1. Introduction
  2. Aim of the article
  3. Steps to Publish LightSwitch Application as Desktop Application
  4. Conclusion

Introduction

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

  1. Part 1: Introduction to Light Switch
  2. Part 2: Rapport with New Data Screen
  3. Part 3: Rapport with Search Data Screen
  4. Part 4: Rapport with Editable Grid Screen
  5. Part 5: Rapport with List and Details Screen
  6. Part 6: Rapport with Details Screen
  7. Part 7: Rapport with External Data Source – Database
  8. Part 8: Rapport with External Data Source – WCF RIA Service
  9. Part 9:Using a custom control in LightSwitch
  10. Part 10: Publish LightSwitch Application as Desktop application and host in local system
  11. Part 11: Publish LightSwitch Application as Web application

Assumption

The article assumes that, we have LightSwitch 2011 installed in our system

Steps to Publish LightSwitch Application as Desktop Application

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.

  1. Client Configuration
  2. Application Server Configuration
  3. Publish Output
  4. Database Connections
  5. Prerequisite
  6. Other Connections
  7. Specify a certificate
  8. Summary

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.

Conclusion

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.

Page copy protected against web site content infringement by Copyscape

About the Author

Niladri.biswas
Full Name: Niladri Biswas
Member Level: Platinum
Member Status: Member
Member Since: 10/25/2010 11:04:24 AM
Country: India
Best Regards, Niladri Biswas
http://www.dotnetfunda.com
Technical Lead at HCL Technologies

Login to vote for this post.

Comments or Responses

Login to post response

Comment using Facebook(Author doesn't get notification)