August 29, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Configuring a ClickOnce Deployment

  • March 17, 2009
  • By Matt Goebel, Rachel Baker
  • Send Email »
  • More Articles »

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.



Click here for larger image


Listing 1.6 The Manifests screen of the Publish dialog

  1. Block application from being activated via a URL: This option controls whether or not the application can be launched from a URL call. If this box is checked, the application will be required to launch from the Start menu. Additionally, disabling this option allows the application to start automatically after installation.
  2. Allow URL parameters to be passed to application: This option enables the application to accept URL parameters. The parameters are then stored in the ActivationUri object to be retrieved in the application code.
  3. User application manifest for trust information: This option controls if the deployment uses the default Microsoft certificate information or your own certificate. If you are looking to control the publisher and product name via certificate on the security/trust dialog (before installation), use this option and sign with your own or your company's certificate. Custom certificates can aid in hiding the security/trust dialog when you have full control over the machines on which the application will be installed (e.g. a network environment).
  4. Exclude deployment provider URL: This option is new to VS 2008 SP1. This setting can be used if the update location is indeterminate at the time of initial release, in which case the application will check for updates from wherever it was initially installed.
  5. Create desktop shortcut: This option is also new to VS 2008 SP1. It controls whether or not the deployment creates an icon shortcut on the desktop. This is an exciting new feature for ClickOnce; prior to SP1, it was not possible to create desktop shortcuts unless you had control over the machines via SMS or some other method.

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.

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.



Click here for larger image


Listing 1.7 The File Associations screen of the Publish dialog

Note that all four fields are required and if not populated will be flagged with a red exclamation point. They are as follows:

  1. Extension: It is important to include the "." and for the extension to be unique. If the extension is found not be unique upon installing, the association will not succeed.
  2. Description: This will display as the hover-over text in Windows.
  3. ProgID: This is a name used to identify the file type.
  4. Icon: You can browse to select an .ico file to use for the files' icon in the file system.

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.

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.





Page 3 of 3



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel