Publishing an Application in LightSwitch Visual Studio 2012

Introduction

In this article I tell you how to publish an application using LightSwitch Visual Studio 2012.

Publishing an application in LightSwitch Visual Studio 2012

Step 1

Open the "Build" menu in LightSwitch Visual Studio and choose "Configuration Manager".

Image 1

build.jpg

Step 2

The Configuration Manager dialog box will appear.

Image 2

cm dia.jpg

Step 3

In the Configuration Manager dialog box,  choose "Active Solution Configuration" list, in that choose "Release".

Image 3

cm 1 dialog.jpg

Step 4

After choosing the Release option the  entire Configuration column contains Release and after that click the "Close" button.

Image 4

cm dialog.jpg

This step helps to prevent debugging from being distributed with our application.

Step 5

On the "Build" menu choose "Publish ApplicationName" (Publish Application2).

Image 5

publish app.jpg

Step 6

Now the LightSwitch Publish Application Wizard appears.

Image 6

wizard.jpg

Step 7

On the "Welcome to the LightSwitch Publish Wizard" page, choose Desktop, and then choose "Next".

Image 7

wizard.jpg

Step 8

The "Application Services" page appears.

Image 8

app service.jpg

Step 9

In the "Where will the application services be hosted" option, choose "Local" and then choose "Next".

Image 9

local.jpg

Step 10

On the "Specify Publishing Preference Page" in the "Where do you want the application files to be placed?" select the default location (D:\Ashwani\Application2\Application2\Publish\).

This will publish the application to a Publish subdirectory in our project directory.

Image 10

specify ref.jpg

Step 11

In the "How do you want to publish the default database?" option, choose "Create a script file to install and configure the database" and then choose "Next".

Image 11

default data base.jpg

Step 12

The "LightSwitch Application Data – SQL Database Connection" page appears.

Image 13

connection.jpg

Step 14

For accepting the Connection String, go to the connection properties then after submitting all the details click the "OK" button.

Image 14

con prop1.jpg

Step 15

On the "Database Configuration" page, accept the default settings, and then click "Next".

Image 15

data confi.jpg

Step 16

On the "Application Administrator" page, in the "Should LightSwitch create the Application Administrator" section, choose "Yes, create an Application Administrator" and type your Windows user name, and then choose "Next". 

Image 16

app admin1.jpg

Step 17

On the "Install Prerequisites" page, accept the default settings, and then click "Next".

Image 17

prerequi.jpg

Step 18

For the remaining pages accept the default settings and click "OK".

Image 18

summary.jpg

Step 19

Choose the "Publish" command; we will see our application become published successfully.

Up Next
    Ebook Download
    View all
    Learn
    View all