Azure / Azure/azure-functions-host

Function in .Net 8 with in-process model failed to startup in Linux container hosted in AKS

Open
#10,413 8 comments 0 reactions 0 assignees View on GitHub
Needs: Triage (Functions)
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

**Is your question related to a specific version? If so, please specify:**
.NET 8
dotnet-inproc
linux Container
AKS
V4

**What language does your question apply to? (e.g. C#, JavaScript, Java, All)**
C#

**Question**

We migrated the function to .Net 8 with in-process model using the steps mentioned in https://github.com/Azure/azure-functions-host/issues/9951#issuecomment-2174365098.

It is working fine locally on windows machine with Visual studio. We deployed function in AKS with Linux containers using base image **mcr.microsoft.com/azure-functions/dotnet:4.**

The function is not working in AKS, we checked the pod logs where it shows it has issue with Startup.

![image](https://github.com/user-attachments/assets/cc079e07-1ea9-499a-be88-ba42e2234f95)


We checked the application insights, where is shows : _Error configuring services in an external startup class. Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified._

![image](https://github.com/user-attachments/assets/f1999541-0191-4d03-a103-dd315defd0f6)


We tried downgrading the version and removing the package 'Microsoft.Extensions.Configuration.Abstractions. However it didn’t work. And got the same error.

The NuGet package used are :
![image](https://github.com/user-attachments/assets/47d999bf-8379-4bf9-ae26-36e209dd364f)

![image](https://github.com/user-attachments/assets/8acb32b7-7532-4cf6-b389-a4b1b10431d2)

We have added keys in local.setting.json and appsetting.json

![image](https://github.com/user-attachments/assets/0f56ba7e-9cf0-4bf4-8f85-444251c49deb)

The same function is working in .Net6 InProc and we are facing this issue after .Net8 upgrade to InProc.

This is blocker to us for our .Net 8 upgrade. Need help in resolving/investigation of this issue.

Let me know if you need more information.

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with the AKS pod startup logs and the external startup assembly-loading error for the .NET 8 in-process deployment, then compare the Linux container image and NuGet package versions with the working .NET 6 deployment. Done means identifying whether this combination is supported and documenting a confirmed resolution; the issue names no repository files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, docker, kubernetes, linux
Domain
backend, cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.