http://www.developer.com/net/article.php/3810641/Configuring-a-ClickOnce-Deployment.htm
If you wish to follow along with the demonstration below, you will need to make sure you have Visual Studio 2008 with SP1 installed. First, open VS 2008 SP1 and create a new Windows Forms project. Right click on the project file in Solution Explorer, choose Properties, and navigate to the Publish tab. Now, let's look at the different option menus and configurations ClickOnce offers. Click the "Options
" button on the Publish tab. The Publish Options dialog contains four sections (Description, Deployment, Manifests, File Associations), each described below.
The following table illustrates where each property is used:
Publish Language was excluded from this list as it has to do with multi-lingual/multi-cultural applications. It controls the language setting in the application's deployment manifest. For example, the following entry is from a manifest with German set as the Publish Language. Note this does not override the cultural settings of your application. It also does not necessarily control the language in which the installation dialogs will be presented; this is determined by the OS settings and the language packs for .NET that are installed on the user's machine. Setting the Publish Language will ensure that the localized files in your application that pertain the language you selected will be included by default in the list of application files to be deployed.
The five options under the Deployment section are:
Here are the files generated with the ".deploy" extension option:
Here are the files generated without the ".deploy" extension option:
Take some caution when configuring these settings as some will not play nicely together or even make sense in certain scenarios. For example, options 1 and 2 shouldn't be enabled at the same time; doing so will result in an error during deployment as shown below.
Note that all four fields are required and if not populated will be flagged with a red exclamation point. They are as follows:
Rachel Baker is a senior developer with Crowe Horwath LLP in the Oak Brook, Illinois, office. She can be reached at 630.990.4434 or rachel .baker@crowehorwath.com.
Configuring a ClickOnce Deployment
March 17, 2009
Configuring a ClickOnce Deployment
You can perform many of the common activities needed to properly install your Windows desktop application to users' machines via the built-in configuration menus in Visual Studio 2008. These menus expose properties that allow you to add description information, configure deployment and manifest-related settings, and control file associations. We will discuss all of these options. We will be using Visual Studio 2008 with SP1, which introduce a few important features, including the ability to create desktop shortcuts and file associations.
Publish Options: Description
In the Deployment section, you'll find the following dialog that allows you to enter general information about the application. This information is used during deployment, updates and uninstalls.
Listing 1.1 The Description screen of the Publish dialog
Listing 1.2 A table describing where the Description properties are used
<asmv1:assemblyIdentity version="1.0.0.3" name="ClickOnce Demo.exe"
publicKeyToken="056bfb40ce3cb353" language="de"
processorArchitecture="msil" type="win32" />
Publish Options: Deployment
In the Deployment section, you'll find settings useful during debugging and for specifying options related to deploying to a web server and installing on a CD.
Listing 1.3 The Deployment screen of the Publish dialog
Listing 1.4 Generated files with the "Use .deploy file extension option
Listing 1.5 Generated files without the "Use .deploy file extension option
Publish Options: Manifests
Under the Manifest section, you'll find the dialog below with five check box options used to configure the manifest files used during the deployment of the application.
Listing 1.6 The Manifests screen of the Publish dialog
ERROR SUMMARY
Below is a summary of the errors, details of these
errors are listed later in the log.
* Activation of
http://gobi/ClickOnceDeployment/ClickOnce%20Demo.application
resulted in exception. Following failure messages were
detected:
+ Exception reading manifest from
http://gobi/ClickOnceDeployment/ClickOnce%20Demo
.application: the manifest may not be valid or the file
could not be opened.
+ Deployment manifest is not semantically valid.
+ trustUrlParameters and disallowUrlActivation cannot both
be true at the same time.
Publish Options: File Associations
In the File Associations section, you'll be able to configure and associate file extensions for your application that are then configured on the user's PC during deployment. This is a new feature in VS 2008 SP1 / .NET 3.5 SP1 that opens up traditional file save and open functionality that has been previously missing from ClickOnce deployed applications.
Listing 1.7 The File Associations screen of the Publish dialog
Conclusion
We have discussed all of the ClickOnce deployment options available on the Publish tab's Options dialog. With exposed configuration for many of the most common features required when installing a desktop application, now you can configure your ClickOnce application to perform exactly as you like. VS 2008 SP1 offers some additional features for improved deployment options.
About the Authors
Matt Goebel is a manager with Crowe Horwath LLP in the Indianapolis, Indiana, office. He can be reached at 317.208.2555 or matt .goebel@crowehorwath.com.