Visual Studio 2019 Re-Downloads Azure Function CLI Tools
A little late to respond, but I just recently ran into this issue and it was seriously slowing down my debugging. I had tried downloading the Azure Functions Core tools via npm as recommended by the Azure Functions GitHub page but to no avail.
Thanks to another stack overflow question, I went digging into where Visual Studio keeps locally installed versions of the Azure Functions Tools:
C:\Users\[username]\AppData\Local\AzureFunctionsTools\Releases
The most recent version (for me it was 2.46.0), was empty. On a whim, I copied over the contents of the previous version into the empty folder and updated the manifest.json inside to point at the new folder.
I updated the following properties.
This fixed the issue immediately for me, but I still don't know why this folder was empty in the first place, or why letting Visual Studio download the tools didn't persist them correctly.
Either way, I just thought I'd share in case anyone else was running into the same thing.
@necampanini's answer is right.
And I will provide more details as below:
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:
itemTemplates
projectTemplates
Download the packages and save them in %LocalAppData%\AzureFunctionsTools\Releases\<version>\templates
. Rename the files:
microsoft.azure.webjobs.itemtemplates.<version>.nupkg
becomesAzure.Functions.Templates.1.0.0.nupkg
microsoft.azure.webjobs.projecttemplates.<version>.nupkg
becomesMicrosoft.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.
Here's a screenshot: