Azure Cloud Service - Create Package Using Visual Studio

This article is a part of a series of articles related to one of the Azure Compute options “Cloud Services”.

 

In our previous articles, we have looked at creating the Azure Cloud Services and also understood how to test the application in our local environment using Compute Emulator. In this article, let’s learn how to create a package to deploy the Azure Cloud Service application to Azure.

In order to deploy your application, you need to package the same into the compatible format of the Cloud. Visual Studio along with Azure SDK provides us the required tools for creating the Package so that we can deploy the same after we are done with the development and testing.

Once you are done with the development of the application, right click on the “Azure Cloud Service” project, as shown below.

package

In the context menu, click on the “Package” menu item highlighted in the above screen capture.

A new window will open where you can select the type of configuration you would like to select.

(For more information about the Service Configuration file, please go through the Azure Cloud Services – Project File details article in this series.)

Configuration file

With the default values selected, click Package to create the package file for the current Azure Cloud Service.

Visual Studio takes a few seconds and creates all the required files. Visual Studio also opens the app.publish folder which contains all these files in the Windows Explorer, as soon as the process of creating the package is completed.

package

Below are the files being created for the package.

  • HellWorldCloudService - This is the name of the package which contains all the codebase along with the Service Definition file which contains the model of the Cloud Service.
  • ServiceConfiguration.Cloud - This file is the Service Configuration file that contains all the configuration settings of the application.

In case, you don’t have Visual Studio but have all the Source Code and all dependencies. You can create the Package files using a Command Line Utility called CSPack which comes with Azure SDK. You can learn more about this command line tool in the following article.

Hope you enjoyed reading the article. You feedback is highly appreciated.