question

Harisboston avatar image
0 Votes"
Harisboston asked AnuragSingh-MSFT edited

Azure function error in nuget package

Hey,

My Azure functions created in the portal no longer work and I am getting this error:
177128-image.png


I can't seem to find a solution for this.
From the portal i open a powershell window and type: Install-Package Microsoft.Azure.WebJobs.Extensions.Storage -Scope CurrentUser
but i get this:177163-image.png

any help?
thanks

azure-functions
image.png (13.7 KiB)
image.png (16.2 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AnuragSingh-MSFT avatar image
0 Votes"
AnuragSingh-MSFT answered AnuragSingh-MSFT commented

Hi @Harisboston

Welcome to Microsoft Q&A! Thanks for posting the question.

I am sorry for the inconvenience faced by you because of this issue. It is under active investigation, and you can refer to the following thread for details on GitHub.
https://github.com/Azure/azure-functions-host/issues/8119

This is because the V4 functions host requires eventhub extension 4.3.0 or later (this check was added here, because of Azure/Azure-Functions#2072). However, it appears that neither the 2.x bundle nor the 3.x bundle contain this version of the extension. (Extracted from the GitHub issue above)

The workaround is to use the following entry in host.json file. For functions created from Azure Portal, you can find this file under "Azure Functions" page --> "App files".

 {
   "version": "2.0",
   "extensionBundle": {
     "id": "Microsoft.Azure.Functions.ExtensionBundle",
     "version": "[2.8.4, 3.0.0)"
   }
 }

Regarding the PowerShell snippet in the question above, please note that the cloud shell (here powershell) opened from Azure Portal's "Cloud shell" button (177882-image.png) is only for managing Azure resources. The command Install-Package run here will install the modules for this shell only and not for any of the resources deployed in your Azure Subscription. For example, if you have an Azure VM or Azure Web Apps service created in your subscription, this command will not install the package on them.

In the current scenario, another approach would be to use Visual Studio or Visual Studio Code to create and test the function locally. Through this method, you would have the control to project files (`.csproj`) in case you would want to add reference to specific version of package.

Please let me know if you have any questions.


Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.



image.png (397 B)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Harisboston, I wanted to check if you had a chance to review my answer above. Please let me know if you have any queries or concerns.

Please 'Accept as answer' if it helped so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·