New things I learned today part 2 – Azure WebJobs ignore app.config transforms

I recently posted a two-part article about getting started with Azure WebJobs and was raving about how awesome they are.

In a WebJob I built for my current project (which is about to finish so contact me if you want me to work on your awesome project) I set up some app.config transforms which contain a couple of entries – one for the database which my WebJob is saving data to, and another for the Message Queue that triggers my WebJob. These are different for dev, staging and live as you would expect.

So the “new thing I learned today” is that they’re not as totally awesome as I first thought – when you publish your WebJob to Azure, it process totally ignores app.config transforms! It’s not just me “doing it wrong” – there’s others out there that have reported the same thing like this dude and these dudes.

So until this functionality is added to the Azure SDK you will need to either manually edit your app.config file before publishing it to different environments, or come up with some hacky code to work around this issue.

Tagged with: , ,