Export (0) Print
Expand All

CSRun Command-Line Tool

Updated: May 9, 2014

The CSRun Command-Line Tool (CSRun.exe) deploys an application to the Microsoft Azure compute emulator and manages the running cloud service.

Before you can use CSRun to deploy an application to the compute emulator, you must run the CSPack Command-Line Tool with the /copyOnly option to prepare the application for local deployment. When CSPack runs with the /copyOnly option, a directory layout is created for the application in the form required by the compute emulator.

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 SDK\v<sdk version>\bin\csrun.exe.

CSRun <ApplicationDirectory> <ConfigurationFile> [options]

To view the most current option list, type CSRun /? at the command prompt from the installed location.

 

Option Description

/run:<ServiceDirectory>;<ConfigurationFile> [/launchbrowser] [/launchDebugger:<DebuggerPath>][/useiisexpress]

This option starts the compute emulator if it is not already running and deploys the application. You can optionally launch a browser on any exposed service endpoints by specifying the /launchbrowser option.

The <ServiceDirectory> parameter refers to the local deployment directory created by running CSPack with the /copyOnly option. By default, this directory is named <MyService>.csx, where <MyService> is the name of your service as specified in the definition file.

The <ConfigurationFile> parameter refers to the name of the configuration file (.cscfg).

The /useiisexpress option causes CSRun to deploy the application to IISExpress. By default CSRun attempts to deploy the application to a local instance of Full IIS. Starting with Azure SDK for .NET - June 2012, the default installation of the Visual Studio Tools for Azure configures the development environment to use /useiisexpress by default. Use the /useiisexpress option to maintain fidelity between testing the application in Visual Studio and the CSRUn command line tool.

The /run option is the default option for CSRun, and so may be omitted from the command syntax. For example, these two versions of the command syntax are identical:

  • csrun <MyService>.csx <MyService>.cscfg /launchbrowser

  • csrun /run <MyService>.csx <MyService>.cscfg /launchbrowser

/update:<DeploymentId>;<ConfigurationFile>

Updates the configuration of a running deployment.

The <DeploymentId> parameter refers to the deployment ID of a running service.

The <ConfigurationFile> parameter refers to the configuration file (.cscfg) of the service.

/dumplogs:<DeploymentId>;<LogDirectory>

Dumps the logs of all role instances deployed under the specified <DeploymentId> to the local directory specified by <LogDirectory>.

/remove:<DeploymentId>

Removes the specified deployment from the compute emulator.

/removeAll

Removes all deployments from the compute emulator.

/status

Prints status information about the running deployments to standard output.

/devfabric:[start|shutdown|clean]

Controls the state of the compute emulator.

The start parameter ensures that the compute emulator is running. This is the default parameter for this option, so you may also start the compute emulator by calling CSRun /devfabric.

The shutdown parameter shuts down the compute emulator.

The clean parameter removes any persistent state associated with the compute emulator. Using the clean parameter may require administrative privileges.

/devstore:[start|shutdown]

Starts or stops the Microsoft Azure storage emulator.

The start parameter ensures that the storage emulator is running. This is the default parameter for this option, so you may also start the storage emulator by calling CSRun /devstore.

The shutdown parameter shuts down storage emulator.

See Also

Show:
© 2014 Microsoft