Home » C# Basics » 11 - Deploying our Applications
11

XCOPY Deployment

Explains the simplest method xcopy and how it works

XCOPY deployment is the simplest deployment method. The term `XCOPY' refers to an old MS-DOS command - xcopy.exe. This command is used to copy a group of files and subdirectories from one location to another.

The XCOPY deployment method works on the same concept. All we need to do is to copy the application assembly from the source location to the target location.

To understand how the XCOPY deployment works, let us consider the following example. Suppose we have created an application (either a console application or a windows application) named - MyApp. This application is stored in a folder called `SampleApp'. The `SampleApp' folder will contain a folder named `MyApp'. Again, the `MyApp' folder will contain a subfolder named `bin'. Inside the `bin' subfolder, there should be two subfolders - `debug' and `release'. All we need to do is to copy the files inside the `release' subfolder (this includes the executable file for our application) and paste them to the target location (in a different folder or even on a different computer). That is all! If we double-click on the executable file at the target location, the application will run without any problem.

Remember that whenever we create an application, the application folder will contain the `bin' subfolder and the `bin' subfolder will contain the `debug' and `release' subfolders. Even the most complex applications that contain a number of assemblies and other files can be deployed using the XCOPY deployment method. However, the limitation is that we cannot create start menu icons, registry entries or display step-by-step installation wizards as most sophisticated installers do. If we need to install our applications on many client computers, this method can be very time consuming.