1
votes

I am using Visual Studio 2015. In order to configure diagnostics for my worker role for Azure SDK 2.7.1 I added diagnostics.wadcfgx file by right clicking on worker role in Azure project and selecting Add Diagnostic Configuration.

The newly created file contains some initial configuration, including

<PrivateConfig>
    <StorageAccount name="" key="" endpoint="" />
</PrivateConfig>

And

<StorageAccount></StorageAccount>

Should I put any values in here or I can only specify:

<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="[CONN STRING]" />

for every environment and it would be enough?

1

1 Answers

2
votes

You don't need to manually change any XML files for your storage account. The article at https://msdn.microsoft.com/en-us/library/azure/dn186185.aspx#BKBM_Changes describes how Visual Studio will pick the storage account. Essentially here is the order of precedence:

  1. Explicit connection string in the CSCFG.
  2. Storage account in WADCFGX
  3. If neither of the above, use the storage account used during the Publish step.

Also in Visual Studio you can go to the Role Properties dialog (right-click the Role under the Roles node in the cloud service project and select properties) and you can manually choose the storage account using the UI.