Forum Discussion
KarimMomo
Sep 26, 2023Copper Contributor
Azure Function V4 - Update NuGet package
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
- LeonPavesicSilver Contributor
Hi KarimMomo,
To update the NuGet package for Microsoft.Azure.WebJobs.Extensions.Storage in Visual Studio Code, follow these steps:
- Open the Azure function project in Visual Studio Code.
- Press Ctrl+Shift+P to open the Command Palette.
- Type nuget and select NuGet: Restore.
- This will restore all of the NuGet packages in your project, including the Microsoft.Azure.WebJobs.Extensions.Storage package.
- 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:
- How to update a NuGet package in Visual Studio Code: https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio
- How to update a NuGet package in Azure Functions Core Tools: https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local
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)- KarimMomoCopper Contributor
<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 content2. 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:
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