Configuring a ClickOnce Deployment
Publish Options: DeploymentIn 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
The five options under the Deployment section are:
- Automatically generate deployment web page after every publish: This option is useful when debugging your ClickOnce deployment. Choosing it will instruct VS to create a default web page from which you can launch the ClickOnce installer each time you publish your application.
- Open deployment web page after publish: This option will instruct VS to launch the web page it creates (if you have checked the first option) each time you publish your application.
- Use .deploy file extension: VS will append a ".deploy" file extension on your assemblies, both .exe and .dll. Unless you are deploying in a controlled environment where you know security policies and firewalls won't interfere with downloading .exe and .dll files it is better to leave this option checked. This will allow the web server administrators to continue blocking .exe and .dll mime types and still let ClickOnce installation succeed.
- NOTE: When using the ".deploy" extension and web site installations be sure to add the extension to the mime types list in IIS so that the files don't get blocked on transfer. If you start getting File Not Found errors during deployment, this is one of the first places to look (right after you check to make sure the files are indeed there, of course).
Here are the files generated with the ".deploy" extension option:
Listing 1.4 Generated files with the "Use .deploy file extension option
Here are the files generated without the ".deploy" extension option:
Listing 1.5 Generated files without the "Use .deploy file extension option
- For CD installations automatically start Step when CD is inserted: This option is fairly straight forward; think "Autorun" for ClickOnce. This is a user convenience option to use if you will be deploying via CD.
- Verify files uploaded to a web server: This option is important when deploying a published package out to a server for production. This will not do much for you when running or testing locally, but it is important when a network connection, security, and permissions come into play in a production environment.
Page 2 of 3