Visual Studio with outdated AzureFunctionsCli

Axel B Andersen 106 Reputation points
2023-03-27T12:53:46.5433333+00:00

We develop lots of Azure Functions Apps. Recently, we onboarded a new junior developer, who was tasked with debugging some new functions. The developers machine was setup with Visual Studio 2022 downloaded from the official site and installed for funning Azure Functions development.

Unfortunately the developer was not able to debug the function, and the error was something like:

[2023-03-24T15:01:51.102Z] A host error has occurred during startup operation '7bb9656f-036b-48ee-9bbd-0c3db50612ab'.

[2023-03-24T15:01:51.104Z] Microsoft.Azure.WebJobs.Extensions.Storage.Blobs: Could not load type 'Microsoft.Azure.WebJobs.ParameterBindingData' from assembly 'Microsoft.Azure.WebJobs, Version=3.0.34.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

The code worked well on 2 other developers installation and after some digging, it turned out, that it was the runtime version of Azure Function Core Tools that was the issue.

The tricky part was, how to update the Azure Function Core Tools. Digging around on the internets lead to this article: https://weblogs.asp.net/sfeldman/updating-azure-functions-tools - The junior developer had never created a new function, so that was the first thing to try. Unfortunately that did not update the Azure Function Core Tools.

Instead the developer downloaded the newest zip file referenced in feed-v<sequence-number>.json, unzipped it and replaced the content in C:\Users\UID\AppData\Local\AzureFunctionsTools\Releases\4.34.0\cli_x64 with the contents of the zipfile. That did the trick! Now the debugger in visual studio runs as expected.

The question is: Isn't there a better way to force an update of Azure Function Core Tools then this? This manual approact or braying that a new function creation will update the tools seems a bit brittle.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,306 questions
{count} votes