Я попытался добавить это в свой файл ServiceDefinition.csdef:
<WorkerRole ...><Runtime><Environment>
<Variable name="AZURE_STORAGE_ACCOUNT">
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/ConfigurationSettings/ConfigurationSetting[@name='AZURE_STORAGE_ACCOUNT']/@value" />
</Variable>
</Environment></Runtime></WorkerRole>
И я установил настройку конфигурации в файле ServiceConfiguration.Cloud.cscfg:
<Role name="WorkerRole">
<ConfigurationSettings>
<Setting name="AZURE_STORAGE_ACCOUNT" value="<secret stuff>" />
</ConfigurationSettings>
</Role>
Но при запуске cspack
:
CloudServices091 : The '/RoleEnvironment/CurrentInstance/Configur
ationSettings/ConfigurationSetting[@name='AZURE_STORAGE_ACCOUNT']/@value' is an
invalid xpath expression.