title: How to deploy Azure WebJob using different configurations for different environments in Visual Studio
body: <p>We have several Web Apps and WebJobs with different configurations for different environment, e.g. Test and Release.</p>
  
  <p>Each WebJob is deployed to a Web App using "Publish as Azure WebJob" in Visual Studio.</p>
  
  <p>We are using the Config Transform extension to transform the App.config that consist of different config sections, connection strings and app settings that needs to be transformed. This works fine for local Debug and for Release.</p>
  
  <p>The problem is that when we use "Publish as Azure WebJob" there is no way to specify which configuration to use and Release is always built and published even if Test is selected inside Visual Studio.</p>
  
  <p>We have also tried to deploy the WebJob together with the Web App but it almost always hangs, same as described in <a href="https://stackoverflow.com/questions/31007166/stuck-when-publishing-web-app-to-azure-with-webjob">Stuck when publishing Web App to Azure with WebJob</a></p>
  
  <p>We don't need to use config transform if that's not possible, e.g. we could configure directly in Azure. But I haven't found a way to configure config sections directly in Azure.</p>