Migrating Azure Function App From In-Process model to Isolated-Worker model and .NET8
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.
Any ideas what might be the root cause for this issue ?