Click here to Skip to main content
Click here to Skip to main content

Different Methods of ClickOnce Deployment

, 10 Dec 2007
Rate this:
Please Sign up or sign in to vote.
An article that discusses different ways of deploying ClickOnce

Introduction

ClickOnce is an easy way of deploying a Windows application via a website, FTP server or file path. There are four ways of publishing an application using ClickOnce, which we are going to see the advantages and disadvantages of here. The four ways of publishing an application via ClickOnce are:

  1. Publish via publish wizard, which is available in the IDE of Visual Studio.
  2. Publish via mage.exe.
  3. Publish via mageUI.exe.
  4. Publish via Team Build in Team Foundation Server.

Publish via Publish Wizard

In order to go to the publish wizard, right click on the Visual Studio project and select Properties. In the Properties window, click on the Publish tab. This will open up the ClickOnce Publish Properties window.

Advantages

  1. The system automatically detects the dependency DLL for publishing, which is referred to in the project.
  2. Easy-to-use publish wizard for step-by-step configuration setup.
  3. The pre-requisite file (setup.exe) for the application is automatically created.

Disadvantages

  1. The publish properties are part of the Visual Studio project and hence in a team environment we normally don’t want all the members of the team to have access to the publish task.

Publish via mage.exe

Manifest generation and editing tool (mage) is a command line EXE that is available in C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin. The folder structure may be different based on where Visual Studio is installed.

Advantages

  1. Can be called in a batch file.
  2. Can be used by the administrator independent of the Visual Studio IDE who has sole authority over the production environment.

Disadvantages

  1. mage.exe does not provide facility to specify if the users will get an update when starting the application. See this forum for more information.
  2. There is no facility to specify and create pre-requisite files (.NET framework) for the application.
  3. The application EXE and DLL paths need to be specified, as the tool does not automatically ascertain them.

Publish via mageUI.exe

The manifest generation and editing tool (mageUI.exe) is a user Interface EXE that is available in C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin. The folder structure may be different based on where Visual Studio is installed.

Advantages

  1. Can be used by the administrator independent of the Visual Studio IDE who has sole authority over the production environment.
  2. Have all the features similar to the integrated publish function of Visual Studio IDE.

Disadvantages

  1. The administrator may need to spend some time in entering the properties for the application and development manifest while publishing. This disadvantage can be overcome by reusing the previous application and deployment manifest via changing few things like version and file path for application.

Publish via Team Build in Team Foundation Server

In the Team Explorer window, right click on Team Build to create a new build type. The publish properties can be set up as XML elements, i.e. the application and deployment manifest configuration settings can be specified as XML elements. Please see this Microsoft link for the XML elements.

Advantages

  1. It comes with Team Build, making the build and publishing processes in an integrated environment.

Disadvantages

  1. Whenever the build happens, the publish files are automatically also generated, leaving the administrator with no control of when to create publish files.
  2. The XML elements and values need to be manually entered and are error-prone.

I came up with the idea of writing this article when I found myself searching the web for evaluating which ClickOnce deployment strategy to go for. Please feel free to ask any questions and I hope to answer as soon as possible.

History

  • 11 December, 2007 -- Original version posted

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

MSDN_MCP
Software Developer (Senior)
United Kingdom United Kingdom
Selvam is a senior software developer for a financial services company in the UK. He likes reading books, spending time with the family and developing challenging software application.

Comments and Discussions

 
GeneralMy vote of 4 PinmemberRailbot25-Feb-13 9:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 10 Dec 2007
Article Copyright 2007 by MSDN_MCP
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid