OJ Develops

Thoughts on software development. .NET | C# | Azure

Building a Deployment Package Using Visual Studio 2010

19 July 2013

Building a Deployment Package Using Visual Studio 2010 thumbnail

Hi, in this post we will be talking about deployment in general and building a deployment package in Visual Studio 2010 in particular.

What is Deployment?

One definition of software deployment is “all of the activities that make a software system available for use”. For web applications built using Visual Studio, this usually means copying the needed files to the designated IIS directory.

During development of a web application, you work with classes, views, scripts, and styles. However, not all of these files need to be copied to the IIS directory. Specifically, the dll files are needed instead of the classes and all compiled content. So the final set of files that are needed to proceed with deployment in IIS are dlls + non-compiled content (views, scripts, styles, images, config, etc).

Building the Deployment Package

It would be tedious to determine one by one which dll’s should be copied. Visual Studio makes this step very easy by offering the “Build Deployment Package” feature. Below are the steps on how to build a deployment package:

  1. Make sure that the project builds and that all the needed files are included in the project.

  2. Change the configuration from Debug to Release. This step is optional but recommended.

release configuration

  1. Right click on the project then click “Build Deployment Package”.

build deployment package

  1. Visual Studio will then create the necessary files needed for deployment. The default folder where the package is located is at obj/Release/Package. The actual files to be copied are further located in the PackageTmp folder.

package tmp

And that’s it! Just copy those files into the appropriate IIS directory and you should be able to browse the site.