Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

v2 Function Could not load type 'Microsoft.Azure.WebJobs.QueueTriggerAttribute'

V2 App that used to work. When I try to run it now I get the following error:

Microsoft.Azure.WebJobs.Host: Error indexing method 'MyClass.Run'. System.Private.CoreLib: Could not load type 'Microsoft.Azure.WebJobs.QueueTriggerAttribute' from assembly 'Microsoft.Azure.WebJobs, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.


May also show for Microsoft.Azure.WebJobs.BlobTriggerAttribute, Microsoft.Azure.WebJobs.BlobAttribute, Microsoft.Azure.WebJobs.TableAttribute, or Microsoft.Azure.WebJobs.QueueAttribute

like image 731
jeffhollan Avatar asked Aug 18 '18 15:08

jeffhollan


People also ask

Which of the following is not true about WebJobs?

Explanation : A. Incorrect: WebJobs can be triggered by both queue messages and blobs.

What is azure WebJobs hosts?

azure-jobs-host-output container is the key for troubleshooting web jobs. This container hosts logs created by the WebJob runtime during initialization and termination of every execution.

What is JobHost in Azure?

The JobHost is the entry point for the Azure WebJobs SDK. It is responsible for indexing, publishing, monitoring and scheduling the functions defined using WebJobs SDK artifacts. Whenever you want to invoke a WebJobs SDK function (triggered or manual/called) you need an instance of the JobHost .


Video Answer


1 Answers

There was a recent release of Azure Functions v2 preview detailed here which requires triggers and bindings that depend on storage to pull in an additional Azure Storage extension. The templates should reflect this change automatically.

To pull in yourself, get the Microsoft.Azure.WebJobs.Extensions.Storage Nuget Package.

For non-C# apps, running func extensions install should pull in the right storage extension.

like image 96
jeffhollan Avatar answered Sep 22 '22 18:09

jeffhollan