Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2019 Re-Downloads Azure Function CLI Tools

I am trying to write a couple of Azure functions (version 2) using Visual Studio 2019. The first time I try to run them I get the following message:

enter image description here

The functions run but if I restart VS and try to run the function again it downloads the tools again, which takes forever. As long as I rerun the function within the same VS session it doesn't re-perform the download.

I have verified that I have the "Azure development" workload installed in VS. I have also installed the Azure Functions Core Tools using NPM as described here. But it continues to re-download each time.

How do I get around this? Thanks.

like image 761
Mark Wagoner Avatar asked Nov 01 '19 11:11

Mark Wagoner


People also ask

How do I redeploy Azure function in Visual Studio?

Alternately, you can deploy by opening the Command Palette with Ctrl + Shift + p , entering deploy to function app , and running the Azure Functions: Deploy to Function App command. Select your function app from the list of apps. Select Deploy from the pop-up window. Wait until the deployment completes.


1 Answers

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.

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.

like image 114
necampanini Avatar answered Sep 23 '22 08:09

necampanini