Bagikan melalui


Walkthrough: Deploying a Visual C++ Application to an Application-local Folder

Describes how to deploy a Visual C++ application by copying files to the application's folder.

Prerequisites

You need the following components to complete this walkthrough:

  • A computer with Visual Studio 2010 installed.

  • An additional computer that does not have the Visual C++ libraries.

To deploy an application to an application-local folder

  1. Create and build a new MFC application by following steps 1 through 3 of Walkthrough: Deploying a Visual C++ Application By Using a Setup Project.

  2. Copy the appropriate MFC and C Run-Time Libraries (CRT) library files to the Release folder of your MFC project. For example, for an x86 platform and Unicode support, copy mfc100u.dll and msvcr100.dll from \Program Files\Microsoft Visual Studio 10.0\VC\redist\x86. For more information about other files that you might need to copy, see Determining Which DLLs to Redistribute.

  3. Run the application on a second computer that does not have the Visual C++ libraries.

    1. Copy the contents of the Release folder to the second computer.

    2. Run the MFC application on the second computer.

    The application runs successfully because the Visual C++ libraries are available in the application-local folder.

See Also

Concepts

Deployment Examples