Run an Application in the Compute Emulator from the Command-line
Updated: June 7, 2012
To run a Windows Azure application in the Windows Azure compute emulator from the command-line, you must first package the application in the appropriate format using the CSPack Command-Line Tool and then use the CSRun Command-Line Tool to start the application in the compute emulator.
To deploy an application as a cloud service in Windows Azure, you must first package the application in the appropriate format. You use CSPack to create the package file. For more information about packaging an application, see Package a Windows Azure Application.
You use the CSRun Command-Line Tool to run your application in the compute emulator. CSRun starts the compute emulator if it is not yet running. When the compute emulator starts, a notification area icon is displayed. You can right-click this icon to display the user interfaces for the compute emulator and the Windows Azure storage emulator and to start or stop these services. You must run the CSRun Command-Line Tool with administrative privileges. If you do not run the tool from an elevated command prompt, two User Access Control (UAC) prompts are displayed each time you start the compute emulator.
To run an additional application in the compute emulator, run the CSRun Command-Line Tool again. Each instance of a running application is displayed as a cloud service in the user interface. The user interface of the compute emulator does not support running additional instances of an application. To update the configuration of a cloud service, run the tool with the /update option and the path to the new configuration file.
Starting with Windows Azure SDK for .NET - November 2011 the default install location is C:\Program Files\Microsoft SDKs\Windows Azure\Emulator.
For Windows Azure SDK version 1.5 the default install location is C:\Program Files\Windows Azure Emulator\emulator.
For Windows Azure SDK version 1.4 and earlier the default install location is C:\Program Files\Windows Azure Emulator\emulator.
Click Start, point to All Programs, and then click Windows Azure SDK.
Right-click Windows Azure SDK Command Prompt, and then click Run as administrator.
In the Windows Azure SDK Command Prompt window, change the directory to where your application files are located.
Type the following command in the window:
csrun <ApplicationName>.csx <ApplicationName>\ServiceConfiguration.local.cscfg /launchbrowser /useiisexpress
Tip Remove the /launchbrowser parameter if you are deploying an application that does not include an HTTP endpoint. Remove the /useiisexpress parameter if you are using Full IIS.