Export (0) Print
Expand All

Deployment Concepts 

This section discusses the main considerations for deploying C++ applications.

Windows Installer Deployment in C++

Visual C++ projects typically use the traditional Windows Installer setup for deployment. To prepare a Windows Installer deployment, you package your application in a setup.exe file and distribute that file, together with an installer package (.msi). Users then run setup.exe to install your application.

You package your application by adding a Setup project to your solution; when built, it creates the setup and installer package files that you distribute to users. For more information, see Choosing a Deployment Method.

Library Dependencies

When a C/C++ application is built using functionality provided by the Visual C++ libraries, it becomes dependent on the presence of those libraries at runtime. In order for the application to run, it must link, either statically or dynamically, to the necessary Visual C++ libraries. If an application dynamically links to a Visual C++ library, then when it runs that library must be present so it can be loaded. On the other hand, if the application statically links to a Visual C++ library, then it does not need the corresponding DLLs to be present on the user's computer. Static linking, however, has some negative effects, such as the increasing the size of the application files, and making maintenance potentially more difficult. For more information, see Advantages of Using DLLs.

Visual C++ libraries are packaged as DLLs, and all necessary libraries for C/C++ applications are installed by Visual Studio on the developer's computer. However, when deploying your application to your users, it is not feasible in most cases to require them to install Visual Studio in order to run your application. It is important to be able to redistribute just the parts of Visual C++ that are required by your application to run correctly.

To understand what files from Visual C++ you need to redistribute with your applications, please see Determining Which DLLs to Redistribute. To explore what packaging and deployment alternatives are available, please see Choosing a Deployment Method. For examples and suggestions on how to resolve some other related issues, please see Deployment Examples and Troubleshooting C/C++ Isolated Applications and Side-by-side Assemblies.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft