Run an Application in the Compute Emulator from the Command-line
Updated: October 24, 2014
To run an Azure application in the Microsoft 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 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 an 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 Microsoft 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 Azure SDK for .NET - November 2011 the default install location is C:\Program Files\Microsoft SDKs\Azure\Emulator.
For Azure SDK version 1.5 the default install location is C:\Program Files\Azure Emulator\emulator.
For Azure SDK version 1.4 and earlier the default install location is C:\Program Files\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 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.