Exit code -2146232576

I have a .Net console app that I have recently deployed to Azure as as a WebJob. Though it successfully deployed when it runs it exists straight away with the following error:
  • Job failed due to exit code -2146232576

And the WebJob status is set to ‘Pending Restart;.

It turns out that I was targeting the .Net 4.7.2 framework, and Azure only supported 4.7 of the framework. After downgrading my console app to 4.7 it ran OK as a WebJob.

Checking which framework is supported

Login to Azure and go to the App Service the WebJob is running under. Go to the Application Settings, and the first option has a select list of which .Net frameworks versions are supported. At the time of writing I had the options of 3.5 or 4.7.

Downgrading you console app

Downgrading is straight forward:

  • Change the target framework via the project properties
  • Update packages.config so all the .Net reference are changed from 4.7.2 to 4.7

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s