Application packaging is the act of creating a package that can install your application onto the user's computer. A package consists of the .cab file or files that contain your compressed project files and any other necessary files the user needs to install and run your application. These files may include setup programs, secondary .cab files, or other needed files. The additional files vary based on the type of package you create.
You can create two kinds of packages — standard packages or Internet packages. If you plan to distribute on disk, floppy, or via a network share, you should create a standard package for your application. If you plan to distribute via an intranet or Internet site, you should create an Internet package.
In most cases, you will package your applications using the Package and Deployment Wizard, which is provided with Visual Basic. You can package applications manually, but the wizard provides valuable shortcuts and automates some of the tasks you would have to perform yourself in a manual packaging session.
Note In addition, you can use the Setup Toolkit and the Package and Deployment Wizard together. You can modify the Setup Toolkit project to customize your setup programs and add features that that Package and Deployment Wizard does not provide, then use the wizard to package and deploy the application.
In addition to creating standard and Internet packages, you can also use the packaging portion of the Package and Deployment Wizard to create dependency files. Dependency files list the run-time components that must be distributed with your application's project files.
Important Any time you create a package, you should be sure that the version number for your project has been set on the Make tab of the Project Properties dialog box. This is especially important if you are distributing a new version of an existing application: Without the appropriate change in version numbers, the end user's computer may determine that critical files do not need to be updated.
For More Information For a more detailed explanation of standard packages and their contents, see "Standard Packages" later in this chapter. See "Internet Packages" for more information about Internet packages and their contents. See "Using the Setup Toolkit Project with the Package and Deployment Wizard" later in this chapter for more information on using the two tools together to create customized setup programs. See "Dependency Files" for an explanation of the contents of a dependency file.
You can freely distribute any application or component that you create with Visual Basic. In addition to an executable (.exe) file, your application might require other files, such as DLLs, ActiveX controls (.ocx files), or bitmaps (.bmp files).
You can legally distribute sample application files and any files that were originally copied to the \Icons subdirectory of the \Visual Studio\Common\Graphics directory when you first installed Visual Basic on your system. Microsoft makes no warranty, express or implied, regarding the merchantability or fitness of these applications, nor does Microsoft assume any obligation or liability for their use.
If you have purchased the Professional or Enterprise Edition of Visual Basic, you can also distribute any files originally copied to the \Visual Studio\Common\Graphics and \Program Files\Common Files\ODBC subdirectories .
Note You may also be able to distribute other ActiveX controls, .exe files, and DLLs that you have purchased. Consult the manufacturer's license agreement for each of the files you plan to distribute to determine whether you have the right to distribute the file with your application.
Regardless of the type of package you create or the tool you use to create it, there are certain steps that must be taken.
Note The Package and Deployment Wizard performs many of these steps for you automatically.
For More Information For a full list of common run-time, setup, and dependency files, see "Files You Need to Distribute" later in this chapter. See "Dependency Files" later in this chapter for more information on creating a .dep file.