title: AZURE_FUNCTIONS_ENVIRONMENT vs ASPNETCORE_ENVIRONMENT
body: <p>In azure functions (v2, c#), there are two environment variables that can be potentially used to identify the name of the current environment.</p>
  
  <ul>
  <li><code>AZURE_FUNCTIONS_ENVIRONMENT</code></li>
  <li><code>ASPNETCORE_ENVIRONMENT</code></li>
  </ul>
  
  <p>I am planning to use <code>AZURE_FUNCTIONS_ENVIRONMENT</code>, and I am wondering if there are reasons to choose one over another?</p>
  
  <p>In terms of behavior of the two, this is what I discovered:</p>
  
  <ul>
  <li><code>AZURE_FUNCTIONS_ENVIRONMENT</code> is set to <code>Development</code> locally by the functions host/runtime. It is not automatically set in azure to <code>Production</code>. One can set this in App Settings in azure.</li>
  <li><code>ASPNETCORE_ENVIRONMENT</code> is not set by the functions host/runtime either locally or in Azure.</li>
  </ul>
  
  <p>I have also raised a <a href="https://github.com/Azure/azure-functions-host/issues/4491" rel="noreferrer">github issue</a> about this a couple of weeks ago, but got no response. I am hoping I might get an answer here.</p>