Jason94
Jason94

Reputation: 13620

My WebJob is missing dependency

I've created a webjob with a simple C# Console application. I make use of the Azure blobs and a database connection - locally everything works like a charm.

In Azure portal I've made a simple app where I added my exe and force it to run. From the logs i get:

[10/09/2016 20:38:52 > ed5cb9: ERR ] Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Don't mind the 6.0.0.0 version, I've tried 7.0.0.0 and the latest 7.2.1, the result does not differ.

Upvotes: 1

Views: 699

Answers (1)

Bruce Chen
Bruce Chen

Reputation: 18435

Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

According to the error you provided, I recommend that you could try to make sure the specific assembly is deployed to Azure. You could use Kudu Console (Can be accessed from Azure : App Service > Web App> Development Tools > Advanced Tools) and check your assembly in the following path:

d:\home\site\wwwroot\app_data\jobs\[triggered|continuous]\{job name}

Additionally, if you deploy your WebJob via the Azure Portal, you could directly upload a zip file that contains the WebJob's files. For more details about Web Jobs, you could follow this tutorial.

Upvotes: 2

Related Questions