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

Amr 0 Reputation points

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=, 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
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