
Publishing with ClickOnce
Publishing your program using ClickOnce is a fairly simple process involving making a few choices in the Publish Wizard and then burning the resulting files to a CD.
Before publishing your program, make sure that you have tested it and that it runs without any errors. Once you are ready to publish, you can launch the Publish Wizard by choosing the Publish command on the Build menu.
The Publish Wizard consists of three steps. The first step is to select where you want the Setup program and any associated files to be located. If you are publishing to a CD, select a folder on your local disk; you will later re-select this location to burn the program to a CD. The second step is to specify how users will install your program—in this case, from a CD-ROM.
The final step involves specifying whether your program will automatically check for a newer version of the program each time it starts. If you have access to a Web server, it is possible to publish updated versions of your program there as described in Closer Look: Distributing Your Program on the Internet. In this case, however, since you are publishing to a CD, your program will not have the ability to check for updates.
When the Publish Wizard runs, it automatically determines any prerequisites for your program. By default, prerequisites such as the .NET Framework are not actually packaged with the setup program—during installation, the setup program checks for the prerequisites and, if necessary, downloads and installs them from the Internet.
To include the prerequisites in the Setup program on the CD, you can set a property in the Project Designer. However, you must first download the redistributable files for the prerequisites to your local computer. To learn more, see Closer Look: Including Prerequisites with Your Program.