Migrating Azure Function App From In-Process model to Isolated-Worker model and .NET8

Amr 0 Reputation points
2024-05-31T11:40:42.4133333+00:00

After I migrated my azure function app to isolated-worker model and .net8, I deployed it to the azure and I started to get the following runtime error: Microsoft.Azure.WebJobs.Script: Error configuring services in an external startup class.: Could not load file or assembly 'System.ComponentModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

Previously the func app used .NET6 and In-process model.

Also this issue doesn't exist locally.

Here is a snapshot of my csproj.

Note that I added an explicit reference of the pckg System.ComponentModel to my csproj file as you can see in the screenshot.

User's image

User's image

Any ideas what might be the root cause for this issue ?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,520 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,314 questions
0 comments No comments
{count} votes