Skip to content

Azure Function CLI Tools keep downloading

There is an issue where by if there is an update for the Azure Function CLI Tools in Visual Studio 2019, it will stuck on keep downloading, reason might be because the firewall blocked the update content, sample as below image:

There are two ways to solve this issue:

Way One (in scenario where by there is no blockage on your internet to download external files):

There is a feed file feed.json (or feed-v3.json) in %LocalAppData%\AzureFunctionsTools. Check the subfolder hierarchy for the latest version of this tool (e.g. for me it’s v3.4.1) and create a corresponding subfolder (e.g. %LocalAppData%\AzureFunctionsTools\Releases\3.4.1).

Get the URL from the feed file and download the CLI zip file Azure.Functions.Cli.min.win-<platform>.<version>.zip. Extract it into %LocalAppData%\AzureFunctionsTools\Releases\<version>\cli.

Get the URLs for these two NuGet packages from the feed file:

  1. itemTemplates
  2. projectTemplates

Download the packages and save them in %LocalAppData%\AzureFunctionsTools\Releases\<version>\templates. Rename the files:

  1. microsoft.azure.webjobs.itemtemplates.<version>.nupkg becomes Azure.Functions.Templates.1.0.0.nupkg
  2. microsoft.azure.webjobs.projecttemplates.<version>.nupkg becomes Microsoft.AzureFunctions.ProjectTemplates.1.0.0.nupkg

Last, copy manifest.json from the older version folder into %LocalAppData%\AzureFunctionsTools\Releases\<version>, and then edit this file to reference the new version.

After completion, it will be like below:

Way 2 (using the old Azure Function CLI Tools to bypass updates):

Locate the installed Azure Function Tools folder, eg. C:\Users\[username]\AppData\Local\AzureFunctionsTools\Releases

The most recent version (example it was 2.46.0), was empty. Copied over the contents of the previous version into the empty folder and updated the manifest.json inside to point at the new folder.

Just like below sample:

Sources: https://stackoverflow.com/questions/58658348/visual-studio-2019-re-downloads-azure-function-cli-tools

Leave a Reply

Your email address will not be published.