5

Missing references upgrading to Webjob V3

Installed the references

'IWebJobsBuilder' does not contain a definition for 'AddTimers' and no accessible extension method 'AddTimers' accepting a first argument of type 'IWebJobsBuilder' could be found (are you missing a using directive or an assembly reference?)

Fernando Magno
  • 375
  • 6
  • 15

4 Answers4

5

Using NuGet package Manager, install Microsoft.Azure.WebJobs.Extensions and Microsoft.Azure.WebJobs.Extensions.Storage packages.

Unheilig
  • 16,196
  • 193
  • 68
  • 98
Pooja Sinha
  • 89
  • 1
  • 5
5

For .net 6.0 , for "AddAzureStorageCoreServices" extension method you have to add Microsoft.Azure.WebJobs.Host.Storage instead of Microsoft.Azure.WebJobs.Extensions

For AddAzureStorage , in .net 6.0 it's not supported anymore you have to replace it with AddAzureStorageBlobs or AddAzureStorageQueuesextention method you need to add Nuget package: Microsoft.Azure.WebJobs.Extensions.Storage

Sharif Yazdian
  • 4,332
  • 3
  • 20
  • 22
1

The solution was to remove the references clean the project delete bin and obj folder add the references again

Fernando Magno
  • 375
  • 6
  • 15
1

If you are using Microsoft.Azure.WebJobs.Extensions version > 3 you will get this error also, drop it to the last 3.xxx version and should work.

Ricky Gummadi
  • 4,559
  • 2
  • 41
  • 67