Publishing C# Application to a Shared Location

Publish Application With One-Click Install

1. Introduction to C# Application Publishing

In this article, we will explore Publishing the C-Sharp application in the network path. The article shows the demo steps using Visual Studio 2005 IDE. Publishing the application to a shared location pays off in such a way that the interested users go to that location and starts installing the published application from it. There is no need of cutting a CD for each client and shipping it to them. Now have a look at the below image:

Publishing Application on Network Share
Publishing Application on Network Share

In the above screen shot, you can see the application developers create an install-able setup and publish that in a shared location. This shared location can be:

The clients who have access to the shared location takes our example from the shared location and installs that on their local machine. This takes place for the first time. The next time onward publisher of the application deliver their updates on the same location. When the client starts their EXE, they get the notification about the available update on the published location.

Publishing the application in a shared location is useful and pays off for both publisher and clients subscribed to the published application. In the publisher point of view, they no need to cut CDs and ship to every client. Also from the end user point of view, they will get the update to the application that they are using.

This example will explore,

  1. Publishing the application in Network shared path
  2. Providing the Update notification to the Client
  3. Pushing the updates forcibly to the Installed client location

We do not have any sample application with this article. You can try this article with any simple c# application on your own.

2. Publishing Application in C#

To start the publishing wizard, we must open the project in visual studio, then right-click on the project name is the solution explorer. From the displayed context menu, we will select the ‘Publish…’ option as shown below:

Starting the C# Application Publisher
Starting the C# Application Publisher

Then from the displayed wizard, publish our example on a network share. Once we have done with that, the shared location contains a file called publish.htm by default.  Clients can access the file in the Internet explorer using the file protocol as stated below:

File://<YourMachineName>//<Network_ShareName>//Publish.htm

When a user accesses the application in Internet explorer, the page looks like the below shown:

Client Viewing Published Application Through Browser
Client Viewing Published Application Through Browser

Here,

  1. First, User navigates to publish location.
  2. After reviewing the content, they install the application on their local machine by clicking Install.

Below is the video, which explains how to publish the application on the network path. It also shows how the client navigates to the published network path and then installs it in their local box.


Video 1: Explains how to publish the C# application in a Network Shared Location.


3. Publishing Application Updates

Let us say 7 people installed the application from the network published location. Also, say the application is altered and published in the same location.

In the above case, we put our update on the network share. When those seven clients start their installed Greet EXE next time, they get an alert message which talks about getting the software update from the published location. This notice gives the end user a choice of updating their application to have the recent version installed or skipping the update to use whatever version they have right now.

Clicking the updates button in the publish property page of the project settings will display a dialog. From the displayed dialog we can specify how we want to provide an update to the end user. Providing the software updates to all the installed location via the published location is shown in the below video.


Video 2: Explains how user gets the Update from the Published location


Sometimes, we may need to push the critical updates to the end locations, not giving the end user the option to skip it. The Updates dialog has an option for that as well. Use the third option shown in the below picture to push the major updates to installed subscribers.

Pushing Updates to the End Nodes
Pushing Updates to the End Nodes

Video 3: Pushing the Major updates to end user machine.


Note: No Code download for this Example. You can create any simple example and try out.

Do you like this Example? Please comment about it for others!!

This site uses Akismet to reduce spam. Learn how your comment data is processed.