Upgrading the application from .NET6 to .NET8 and have updated the packages as well and after that I am getting this error.

Himanshu Chawla 0 Reputation points
2025-04-11T11:13:31.5933333+00:00

<PropertyGroup>

<TargetFramework>net8.0</TargetFramework>

<AzureFunctionsVersion>v4</AzureFunctionsVersion>

</PropertyGroup>

<ItemGroup>

<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />

<PackageReference Include="Azure.Identity" Version="1.11.4" />

<PackageReference Include="Azure.Storage.Blobs" Version="12.14.1" />

<PackageReference Include="Azure.Storage.Queues" Version="12.12.0" />

<PackageReference Include="MassTransit.Azure.ServiceBus.Core" Version="8.0.9" />

<PackageReference Include="MassTransit.WebJobs.ServiceBus" Version="8.0.9" />

<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />

<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="5.0.0" />

<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="4.0.1" />

<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.1.0" />

<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.0" />

<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.1" />

<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

<PackageReference Include="Scrutor" Version="4.2.0" />

<PackageReference Include="System.Drawing.Common" Version="6.0.0" />

</ItemGroup>

<ItemGroup>

[2025-04-11T11:08:50.870Z] Error configuring services in an external startup class.

[2025-04-11T11:08:50.876Z] Error configuring services in an external startup class. Could not load file or assembly 'Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

[2025-04-11T11:08:51.156Z] A host error has occurred during startup operation '8228288f-3d74-4b92-860b-8ef1b7584788'.

[2025-04-11T11:08:51.162Z] Microsoft.Azure.WebJobs.Script: Error configuring services in an external startup class. Could not load file or assembly 'Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

Value cannot be null. (Parameter 'provider')

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,215 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 74,696 Reputation points
    2025-04-11T16:16:40.4033333+00:00

    I would guess it's related to use of the deprecated package:

    AutoMapper.Extensions.Microsoft.DependencyInjection

    you should update to a supported package, say AutoMapper 14.0

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.