Azure Function V4 - Update NuGet package

Copper Contributor

Hi,

I'm fairly new to Azure and I'm looking for assistance. I recently upgraded Azure function app to V4. However, I'm encountering the following error message:

Update your NuGet package reference for Microsoft.Azure.WebJobs.Extensions.Storage to 4.0.4 or later

How do I update the NuGet package ? I was able to open the Azure function in MS Visual Code but then I'm not sure how to proceed to update this

Thank you

 

2 Replies

Hi @KarimMomo,

To update the NuGet package for Microsoft.Azure.WebJobs.Extensions.Storage in Visual Studio Code, follow these steps:

  1. Open the Azure function project in Visual Studio Code.
  2. Press Ctrl+Shift+P to open the Command Palette.
  3. Type nuget and select NuGet: Restore.
  4. This will restore all of the NuGet packages in your project, including the Microsoft.Azure.WebJobs.Extensions.Storage package.
  5. To verify that the package has been updated, open the packages.config file and check the version of the Microsoft.Azure.WebJobs.Extensions.Storage package. It should be 4.0.4 or later.

If you are using Azure Functions Core Tools, you can update the NuGet package using the following command:

 

dotnet add package Microsoft.Azure.WebJobs.Extensions.Storage --version 4.0.4

 

 

This will update the NuGet package in your project and restore all of the dependencies.

Useful links:


Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.


If the post was useful in other ways, please consider giving it Like.


Kindest regards,


Leon Pavesic
(LinkedIn)

<Reply Eddited>

Hi Leon,

I really appreciate the time you took to answer me.
Here are the steps I've done so far: 

1. I've downloaded the Function App content

KarimMomo_0-1695844442253.png

2. I've unzip the file and opened it in Visual Studio Code.

3. I installed an extension called NuGet Extension Manager

4. I've installed the latest version of Microsoft.Azure.WebJobs.Extensions.Storage. This is what I see now in my project:

1.PNG

 

Is this good so far ?
What should be the next step ? 
How do I update the Azure Function online after make these changes to reflect the NuGet update ?

Thank you