Where I work, we create Azure web sites and SQL databases for development purposes as needed as well as for staging and production environments. We create a web.config transform for each publish profile to change the database connection string to the database associated with that web site.
Now, I am trying to create an Azure WebJob that will need to make updates to a database. I create it by right-clicking on a web app project and selecting to Add a new Azure WebJob.
What I need to get this to do what I need it to is the SQL Database connection string that points to the same database the Web App is using. I know that these can be set in the Azure portal and grabbed with the configuration manager, but I would rather be able to have it in the App.config of the WebJob and transform the App.config as needed.
I tried using Slow Cheetah for this, but it seems that you can only have a transform for Debug and Release configurations.
I started going through the steps specified in this blog: http://gunnarpeipman.com/2013/11/using-web-config-transforms-with-app-config-files/
It tells you how to manually edit the .csproj file to enable App.config transforms. However, this is not a better solution, because you would have to go manually edit the project file for every transform you need.
Can anyone tell me how to accomplish this? Is it even possible? OR is there a way to share the values in my web app's web.config file that I know will be transformed to what I need them to be?