Azure / azure-functions-vs-build-sdk

MSBuild task for Azure Functions
MIT License
98 stars 65 forks source link

Microsoft.NET.Sdk.Functions 4.1.3 doesn't work with local debug #588

Closed sergejsxcode closed 2 years ago

sergejsxcode commented 2 years ago

Hi!

I have installed the latest Nuget version Microsoft.NET.Sdk.Functions 4.1.3, also updated functions app to .Net 6 ~4. When I try to debug function locally i see the exception:

A host error has occurred during startup operation 'df893eaa-2719-460c-b1a7-7fdcb3f2eb42'. [2022-09-16T07:39:06.524Z] System.Private.CoreLib: Could not load file or assembly 'Microsoft.Azure.WebJobs.Extensions.Http, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. [2022-09-16T07:39:06.573Z] Failed to stop host instance '92c4a6d7-17ab-47ba-bb07-6299061053f7'. [2022-09-16T07:39:06.574Z] Microsoft.Azure.WebJobs.Host: The host has not yet started.

When I have changed to Microsoft.NET.Sdk.Functions 4.1.1 with the same .Net 6 ~4 it starts working. Seems like problem with next versions 4.1.2 ~ 4.1.3.

sergejsxcode commented 2 years ago

I have fixed it after this recommendation: We just resolved this by deleting %LOCALAPPDATA%\AzureFunctionsTools\Releases\4.21.0, opening VS 2022 back up, going to Tools -> Options -> Projects and Solutions -> Azure Functions. Clicking Check for Updates and downloading it. Then it magically worked again. I have had some sort of folders after installation. folders

ramya894 commented 2 years ago

Closing the issue as resoled,