When you develop an application by using Visual C++, you have the advantage of working on a computer that is not only a good development environment, but is also a convenient environment on which to run and test applications. However, when you want to deploy your application to other computers, you must redistribute all the files that are required to support the application on the target system. For more information about which files you might want to redistribute with your application, see Deployment Examples and Determining Which DLLs to Redistribute.
Only some Visual C++ files can be redistributed with your application. See the Microsoft Software License Terms for Visual Studio 2005 and the Redist.txt file to see which files can be redistributed with your application. EULA.txt is in the \Setup directory on the first Visual C++ 2008 product CD or on the DVD, and Redist.txt is located in the Program Files\Microsoft Visual Studio 2005 directory on the second CD or on the DVD.
Visual C++ files can be redistributed by using either the provided Redistributable Merge Modules, or the Visual C++ Redistributable Package, or by deploying specific Visual C++ assemblies as private side-by-side assemblies in the application local folder.
Note: |
|---|
An application local folder is a folder that contains an application executable file. Private side-by-side assemblies must be deployed within the application local folder or one of its subfolders. For more information about the naming rules that apply to subfolders that contain private side-by-side assemblies, see Assembly Searching Sequence. |
In the first case, a merge module with a specific Visual C++ assembly has to be included in a Windows Installer package or similar installation package used to deploy this application to another computer. For more information, see Redistributing Using Merge Modules. An example of this deployment may be found in How to: Deploy a Setup and Deployment Project.
The Visual C++ Redistributable Package (VCRedist_x86.exe, VCRedist_x64.exe, VCRedist_ia64.exe) has to be executed on the target system as a prerequisite to installation of the application. This package installs and registers all Visual C++ libraries.
Note: |
|---|
We recommend that you use this package to redistribute Visual C++ libraries for applications that you built with Visual C++ Express and for cases when you want to deploy all Visual C++ libraries at the same time. |
For an example of how to use this package see How to: Deploy using XCopy.
When you deploy Visual C++ libraries as a private side-by-side assembly, all DLLs and the manifest file that form this assembly have to be added to the Windows Installer or similar installation package. They must be deployed to the target computer in a subdirectory in the application local folder, according to the rules for deploying private assemblies. Information on which Visual C++ DLLs and manifest files are part of which Visual C++ assemblies can be found in Visual C++ Libraries as Shared Side-by-Side Assemblies. A description of the rules that you must follow when you deploy private assemblies for loading at runtime can be found in Assembly Searching Sequence. For an example of how to deploy Visual C++ libraries as a private assembly, see How to: Deploy using XCopy.