ClickOnce Deployment for Visual C++ Applications

Visual Studio provides two different technologies for deploying Windows applications: ClickOnce deployment or Windows Installer deployment.

ClickOnce Deployment in C++

The Visual C++ development environment does not directly support deployment of Visual Studio 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 Studio 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 Mage.exe (Manifest Generation and Editing Tool) or its graphical user interface version (for information, see MageUI.exe (Manifest Generation and Editing Tool, Graphical Client)).

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 ARM). See Deploying Prerequisites for 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 the 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 Creating Bootstrapper Packages.

For a more detailed description of the technology, see ClickOnce Security and Deployment. For a detailed example of ClickOnce deployment, see Walkthrough: Manually Deploying a ClickOnce Application.

See also

Mage.exe (Manifest Generation and Editing Tool)
MageUI.exe (Manifest Generation and Editing Tool, Graphical Client)
Makecert.exe (Certificate Creation Tool)
Deploying Desktop Applications
Deploying Applications, Services, and Components
ClickOnce Security and Deployment
Creating Bootstrapper Packages
.NET Programming with C++/CLI (Visual C++)
Native and .NET Interoperability