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

Click Once Deployment Configuration

, 30 Jul 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
Few Configuration Options in Click Once Deployment Technique

Introduction

This is a continuation of my previous article on Click Once Deployment in Visual Studio. In my previous article (Click Once Deployment Technique), I discussed the basics of Click Once Deployment. In this article, I am going to discuss few very important options and settings regarding the deployment destination and the deployment items.

Start Menu Name for a ClickOnce Application

When a ClickOnce application is installed, an entry is added to the Start menu and the Add or Remove Programs list. By default, the display name is the same as the name of the application assembly, but we can change the display name by setting Product name in the Publish Options dialog box.

Product name will be displayed on the publish.htm page or any specified start page of deployment unit. For an installed offline application, it will be the name of the entry in the Start menu, and it will also be the name that shows in Add or Remove Programs.

Publisher name will appear on the publish.htm page above Product name, and for an installed offline application, it will also be the name of the folder that contains the application's icon in the Start menu.

We can set the Product name and Publisher name properties in the Publish Options dialog box. Right click the project and click on Properties to get the Property window and then click on Publish Tab for making the settings for deployment. Click on the Options button and in the Publish Options Dialog box, we can put in the Product and Publisher name. Refer to the following screenshot:

P1.jpg

Selecting Files to be Made Available in Deployment Unit

When publishing a ClickOnce application, all non-code files in the project are deployed along with the application. In some cases, you may not want or need to publish certain files, or you may want to install certain files based on conditions. Visual Studio provides the capabilities to exclude files, mark files as data files or prerequisites, and create groups of files for conditional installation.

Files for a ClickOnce application are managed in the Application Files dialog box.

Initially, there is a single file group named (Required). We can create additional file groups and assign files to them. However we cannot change the Download Group for files that are required for the application to run. For example, the application's .exe or files marked as data files must belong to the (Required) group.

The default publish status value of a file is tagged with (Auto). For example, the application's .exe has a publish status of Include (Auto) by default. Refer to the screenshot below.

Files with the Build Action property set to Content are designated as application files and will be marked as included by default; they can be included, excluded, or marked as data files.

The exceptions are:

  • Data files such as SQL Database (.mdf and .mdb) files and XML files will be marked as data files by default. 
  • References to assemblies (.dll files) are designated as follows when we add the reference: If Copy Local is False, it is marked by default as a prerequisite assembly (Prerequisite (Auto)) that must be present in the GAC before the application is installed. If Copy Local is True, the assembly is marked by default as an application assembly (Include (Auto)) and will be copied into the application folder at installation. A COM reference will only appear in the Application Files dialog box (as an .ocx file) if its Isolated property is set to True, and it will be included by default.

Exclude Files from ClickOnce Publishing

Right click the project and click on Properties to get the Property window and then click on Publish Tab for making the settings for deployment. Click on the Application Files button and in the Application Files Dialog box, we can select Exclude in Publish Status Field corresponding to the file. Refer to the screenshot below.

Mark Files as Data Files

Right click the project and click on Properties to get the Property window and then click on Publish Tab for making the settings for deployment. Click on the Application Files button and in the Application Files Dialog box, we can select File(s) that we want to mark as data and then in Publish Status Field select Data File from the drop-down list. Refer to the screenshot below.

Mark Files as Prerequisites

Right click the project and click on Properties to get the Property window and then click on Publish Tab for making the settings for deployment. Click on the Application Files button and in the Application Files Dialog box, we can select the application assembly (.dll file) that we wish to mark as a prerequisite. Note that our application must have a reference to the application assembly in order for it to appear in the list. In the Publish Status field, select Prerequisite from the drop-down list. Refer to the following screenshot:

P2.jpg - Click to enlarge image

Conclusion

So, we learnt few options regarding the selection of files and setting up the Product and Publisher name. For further studies, please refer to this URL.

History

  • 30th July, 2009: Initial post

License

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

Share

About the Author


Comments and Discussions

 
GeneralCreate Shortcut In Desktop Pinmembereg_Anubhava18-May-11 0:41 
GeneralMy Vote of 5 PinmemberAditithegreat3-Sep-09 17:25 
GeneralRe: My Vote of 5 PinmemberRobin_Roy6-Sep-09 19:08 
Questionfor windows service.. PinmemberTanmay Broachwala25-Aug-09 1:16 
GeneralMy Vote of 5 Pinmemberjohnclark6410-Aug-09 18:12 
GeneralRe: My Vote of 5 PinmemberRobin_Roy17-Aug-09 21:58 
GeneralMy Vote of 5 Pinmemberbrown2010-Aug-09 17:52 
GeneralRe: My Vote of 5 PinmemberRobin_Roy17-Aug-09 21:56 
Thanks
GeneralMy vote of 2 PinmemberJRiggs4-Aug-09 6:06 

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 | Terms of Use | Mobile
Web01 | 2.8.1411023.1 | Last Updated 31 Jul 2009
Article Copyright 2009 by Robin_Roy
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid