Azure Cloud Services Config Schema (.cscfg File)
The service configuration file specifies the number of role instances to deploy for each role in the service, the values of any configuration settings, and the thumbprints for any certificates associated with a role. If the service is part of a Virtual Network, configuration information for the network must be provided in the service configuration file, as well as in the virtual networking configuration file. The default extension for the service configuration file is .cscfg.
The service model is described by the Cloud Service (classic) Definition Schema.
By default, the Azure Diagnostics configuration schema file is installed to the
C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\<version>\schemas directory. Replace
<version> with the installed version of the Azure SDK.
For more information about configuring roles in a service, see What is the Cloud Service model.
Basic Service Configuration Schema
The basic format of the service configuration file is as follows.
<ServiceConfiguration serviceName="<service-name>" osFamily="<osfamily-number>" osVersion="<os-version>" schemaVersion="<schema-version>"> <Role …> … </Role> <NetworkConfiguration> … </NetworkConfiguration> </ServiceConfiguration>
The following topics describe the schema for the
Service Configuration Namespace
The XML namespace for the service configuration file is:
ServiceConfiguration element is the top-level element of the service configuration file.
The following table describes the attributes of the
ServiceConfiguration element. All attributes values are string types.
|serviceName||Required. The name of the cloud service. The name given here must match the name specified in the service definition file.|
|osFamily||Optional. Specifies the Guest OS that will run on role instances in the cloud service. For information about supported Guest OS releases, see Azure Guest OS Releases and SDK Compatibility Matrix.
If you do not include an
|osVersion||Optional. Specifies the version of the Guest OS that will run on role instances in the cloud service. For more information about Guest OS versions, see Azure Guest OS Releases and SDK Compatibility Matrix.
You can specify that the Guest OS should be automatically upgraded to the latest version. To do this, set the value of the
To specify a specific version manually, use the
The default value for the
|schemaVersion||Optional. Specifies the version of the Service Configuration schema. The schema version allows Visual Studio to select the correct SDK tools to use for schema validation if more than one version of the SDK is installed side-by-side. For more information about schema and version compatibility, see Azure Guest OS Releases and SDK Compatibility Matrix|
The service configuration file must contain one
ServiceConfiguration element. The
ServiceConfiguration element may include any number of
Role elements and zero or 1
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.