Azure function error in nuget package

Haris Papageorge 246 Reputation points
2022-02-23T10:44:12.987+00:00

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
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,972 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,376 Reputation points
    2022-02-25T10:25:41.59+00:00

    Hi @Haris Papageorge

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.