title: How to set ASPNETCORE_ENVIRONMENT during publishing?
body: <p>I have several WebDeploy publish profiles that deploy my .NET Core web project to various places (Dev, QA, Stage on IIS).  For the application to know where it's running, I need to set the ASPNETCORE_ENVIRONMENT environment variable.  </p>
  
  <p>Is it possible to set the ASPNETCORE_ENVIRONMENT environment variable as a part of publishing the application?</p>
  
  <p>P.S.  <a href="https://stackoverflow.com/questions/41546943/how-to-set-aspnetcore-environment-to-be-considered-for-publishing-an-asp-net-cor">This question</a> doesn't solve anything for me because it shows how to achieve it manually.  I would like it to be automatic as a part of deploy a publish profile.  </p>