azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

[Triage] Function core tool release 4.0.4629 missing Function Host dependency, host cannot start in certain configurations

Open kiwiliam opened this issue 3 years ago • 6 comments

[Keywords] Function core tool, 4.0.4629, missing dependency, Function Host cannot start, "microsoft.azure.webjobs.extensions.http: could not load file or assembly 'system.net.http.formatting, version=5.2.8.0"

[Issue] After upgrading to release 4.0.4629, the Function Host fails on startup with the following AssemblyNotFoundException. Seems some dependencies were missing. image

[Repro Steps]

  1. Install Azure Function core tool 4.0.4629.
  2. Using "func new" to create an HTTP Function.
  3. Attach to Node Function in VScode. Start debugging.
  4. Function Host startup fails and reports the missing assembly.

[Mitigation] Downgrade to 4.0.4590, try again repro steps, and Function Host starts normally. image

[Comment] Please double-check release 4.0.4629 and fix if the packages were indeed missing. Thanks in advance.

kiwiliam avatar Jul 08 '22 03:07 kiwiliam

[Update] Cannot repro on some systems MicrosoftTeams-image (1) image

Stable repro on some, VScode 1.69.0, Azure Functions extension 1.7.4, Node.js 16.13.2, both .NET core 3.1 and .NET 6 installed image image

kiwiliam avatar Jul 08 '22 04:07 kiwiliam

I'm getting this exception on 4.0.4629 as well when I'm running deployment to function app on linux from Octopus with the following command line:

func azure functionapp publish $appServiceName --csharp

older avatar Jul 14 '22 08:07 older

Happening for me too. Definitely needs to be fixed

johnmc-tc avatar Jul 14 '22 10:07 johnmc-tc

Hello, some updates here.

On Windows 11, I can fully resolve this issue for 4.0.4629 by the following steps. "Purging SDKs"

  1. Clear all NuGet package caches. "dotnet nuget locals all --clear" https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-locals#examples Also the VS NuGet cache via GUI.

  2. Completely uninstall all .NET versions, Function core tools, delete all residual files.

  3. Install only the latest .NET, then Function core tools, and do a repro to make sure it starts normally.

  4. Then reinstall everything else as needed.

I haven't yet encountered the same on Linux as most are disposable containers. Not sure if purging SDKs will help.

kiwiliam avatar Jul 14 '22 10:07 kiwiliam

I'm getting this exception on 4.0.4629 as well when I'm running deployment to function app on linux from Octopus with the following command line:

func azure functionapp publish $appServiceName --csharp

Sounds like a build issue to me. Any sharable repro? I'd suggest flushing the cache first. I haven't yet encountered the same on Linux or on the cloud. Just the local toolchain.

kiwiliam avatar Jul 14 '22 11:07 kiwiliam

@kiwiliam I'm running Octopus as a windows service, so it is neither Linux nor cloud. Downgrading function core tools to 4.0.4590 fixed the issue.

older avatar Jul 15 '22 09:07 older