In one of our Azure projects, during the development phase, while writing the files into Azure blob storage in Visual Studio Code, we faced the below error:
The root cause of the error: “Error fetching version information for extension bundle Microsoft.Azure.Functions.ExtensionBundle Unable to find or download”.
Solution:
“Extension Bundles” can add a pre-defined compatible set of binding extensions to the function app. Extension bundles are always versioned. Each version contains a specific set of binding extensions verified to work together.
When you create a non-.NET Function project for tooling or in the portal, the extension bundles are already enabled in the app’s host.json file.
An extension bundle reference is defined by the extensionBundle
section in a host.json as follows:
{
“version”: “2.0”,
“extensionBundle”: {
“id”: “Microsoft.Azure.Functions.ExtensionBundle”,
“version”: “[3.3.0, 4.0.0)”
}
}
Step1:
Remove the above code from host.json file
Step2:
After removing the extension bundle code from host.json, run the below commands for installing Microsoft.Azure.Functions.ExtensionBundle and Microsoft.Azure.WebJobs.Extensions.Storage.
func extensions install –package Microsoft.Azure.Functions.ExtensionBundle –version 4.0.0 –force
func extensions install –package Microsoft.Azure.WebJobs.Extensions.Storage –version 4.0.4 –force