Closer Look: Including Prerequisites with Your Program
In this lesson, you will learn how to package required components with your program using ClickOnce publishing.
By default, programs published using ClickOnce technology will download any required prerequisites from the Internet during installation. If you try to install the program on a computer that doesn't have Internet access, the installation could fail.
To prevent this, you can package prerequisites such as the .NET Framework redistributable files along with the program.
If you know that everyone who will install your program has Internet access, you should use the default method—that way, if a newer version of the prerequisite is available, users will get the latest version.
To include prerequisites
Open your project from the previous lesson, Distributing a Program on CD: Publishing with ClickOnce.
In Solution Explorer, select the project node, and then on the Project menu, choose Properties.
The Project Designer opens.
In the Project Designer, click the Publish tab.
Click the Prerequisites button to open the Prerequisites dialog box.
In the Prerequisites dialog box, select the Download prerequisites from the same location as my application check box and then click OK.
On the Build menu, choose Publish ProjectName, where ProjectName is the name of your project.
The Publish Wizard is launched.
Click Finish to publish the program.
You may be prompted to download the .NET Framework redistributable files if you have not already done so.
In Windows Explorer, browse to the location where the program was published, and verify that both the Setup.exe and Dotnetfx.exe files are there.
In this lesson, you learned how to publish prerequisites along with your program. At this point, you have several choices for where to go next.
If you have access to a Web server and want to learn how to publish your program to the Internet, see Closer Look: Distributing Your Program on the Internet.
If you were unable to burn a CD-ROM or DVD-ROM, see Sending a Program in E-mail: Creating a Compressed (Zipped) File.
Otherwise, you are done with the lessons in the guided tour. You can go on to the next topic for some suggestions on other resources for learning more about Visual Basic.
Next Lesson: Moving Forward: Where Do I Go from Here?