How to: Deploy using XCopy

JavaScript EditorDhtml editor     Free javascript download 



Main Page

This topic demonstrates how to deploy applications by copying application files from one computer to another. This technique is useful for debugging applications on another computer. For background on this deployment scenario, see Deployment Examples.

Deploying Visual C++ library DLLs as shared assemblies

  1. Create a folder structure on the development computer that matches the folder structure to be used on the target computer. For this example, create a \bin folder and copy myapplication.exe there. Then create a \bin\mylibrary folder and copy MyLibrary.dll there.

  2. Copy this folder to the target computer.

  3. Copy vcredist_x86.exe from %PROGDIR%\Microsoft Visual Studio 8\SDK\v2.0\Bootstrapper\Packages\vcredist_x86\vcredist_x86.exe to the target computer

  4. Run vcredist_x86.exe on the target computer.This installs all libraries as shared assemblies. On a target computer with support for manifest-based binding of applications to their dependencies (Windows XP Home Edition, Windows XP Professional, Windows Server 2003), the libraries are installed in the WinSxS folder. On a computer without such support (Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows 2000), the libraries are installed to both the WinSxS and System32 folders.

    NoteNote

    For deploying 64-bit applications to 64-bit operating systems, use vcredist_x64.exe or vcredist_ia64.exe.

    NoteNote

    vcredist_*.exe installs only the release versions of DLLs. Debug versions should only be deployed as private assemblies; see the next procedure for more details.

  5. Your application is ready to be run.

Deploying Visual C++ library DLLs as private assemblies

  1. Create a folder structure on the development computer that matches the folder structure to be used on the target computer. For this example, create a \bin folder and copy myapplication.exe there. Then create a \bin\mylibrary folder and copy MyLibrary.dll there.

  2. On the development computer, from %PROGDIR%\Microsoft Visual Studio 8\VC\Redist\x86, copy Microsoft.VC80.CRT and Microsoft.VC80.CRT to \bin and to \bin\MyLibrary.

    NoteNote

    For deploying 64-bit applications to 64-bit operating systems, use \vc\redist\amd64 or \vc\redist\ia64.

  3. Copy the \bin folder to the target computer. On a target computer with manifest-based binding support (Windows XP Home Edition, Windows XP Professional, Windows Server 2003), no further preparation is necessary. On a computer without such support (Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows 2000), Microsoft.VC80.CRT and Microsoft.VC80.MFC must be on the path.

    NoteNote

    For debug applications, use DLLs from \vc\redist\debug_nonredist\.

See Also



JavaScript EditorDhtml editor     Free javascript download