title: CloudConfigurationManager.GetSetting Returns Null in Unit Tests
body: <p>So I've written an Azure worker role and some unit tests to verify that it works as expected.  The problem is that CloudConfigurationManager.GetSetting always returns null.</p>
  
  <p>The following WorkerRole method is called before any unit test is run:</p>
  
  <pre><code> public override bool OnStart()
   {
      string connectionString = CloudConfigurationManager.GetSetting("StorageConnectionString");
  
      var account = CloudStorageAccount.Parse(connectionString);
      ...
   }
  </code></pre>
  
  <p>I used Visual Studio's settings gui to actually set the connection string properties (different ones for local and cloud deployments) so I know the cscfg files should be valid. 
  Here's what the local ServerAgent settings look like:</p>
  
  <pre><code>&lt;Role name="ServerAgent"&gt;
  &lt;Instances count="1" /&gt;
  &lt;ConfigurationSettings&gt;
    &lt;Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /&gt;
    &lt;Setting name="StorageConnectionString" value="SUPER SEKRET" /&gt;
  &lt;/ConfigurationSettings&gt;
  </code></pre>
  
  <p></p>
  
  <p>So I guess the question is, <strong>how does CloudConfigurationManager find the correct cscfg file</strong>?  The unit test project takes a reference to the ServerAgent project, but the ServerAgent project doesn't take any sort of reference to the CloudService project.</p>
  
  <p><img src="https://i.stack.imgur.com/iPtQh.png" alt="Solution layout"></p>