|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
ClickOnce Deployment for Visual C++ Applications
The Visual C++ development environment does not directly support deployment of Visual C++ projects with ClickOnce, but tools are available to use it.
Visual Studio does support ClickOnce in the Visual C# and Visual Basic development environments. If your Visual C++ project is a dependency of a Visual C# project, you can publish the application (including its dependencies) using ClickOnce deployment from the Visual C# development environment.
To deploy a Visual C++ application using ClickOnce, you first have to build a ClickOnce Application Manifest and a ClickOnce Deployment Manifest using the Manifest Generation and Editing Tool (Mage.exe) or its graphical user interface version (for information, see Manifest Generation and Editing Tool, Graphical Client (MageUI.exe)).
You first use Mage.exe to build the application manifest; the resulting file will have the extension .manifest. You then use Mage.exe to build the deployment manifest; the resulting file will have the extension .application. You then sign the manifests.
The application manifest must specify the target processor (x86, x64, or Itanium). See Deploying 64-bit Applications for information on these options.
Also, the name of the application and deployment manifests must be different from the name of the C++ application. This avoids conflict between the application manifest created by Mage.exe and the external manifest that is part of the C++ application.
Your deployment will need to install any Visual C++ libraries on which your application depends. To determine the dependencies for a particular application, you can use depends.exe or the DUMPBIN utility with the /DEPENDENTS option. For more information on dependencies, see Understanding Dependencies of a Visual C++ Application. You might need to run VCRedist.exe; this utility installs Visual C++ libraries on the target computer.
You may also need to build a bootstrapper (prerequisites installer) for your application to deploy prerequisite components; for information on the bootstrapper, see Adding Custom Prerequisites.
For a more detailed description of the technology, see ClickOnce Deployment. For a detailed example of ClickOnce deployment, see Walkthrough: Manually Deploying a ClickOnce Application.