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.

Posted in Learn Something New, Visual Studio, Windows Azure Tagged with: , ,

About Maff

Maff Rigby

I'm a certified .Net, Umbraco and AngularJS freelance developer with over 15 years experience in the IT industry. As well as writing code I love to teach; I run a number of workshops and 1-1 coaching sessions on Angular JS and Umbraco, and share what I know and learn here!

I’m social (ish)

Connect with me on LinkedIn, follow me on Twitter, or fail to find me on Facebook.