Currently, I am running a .NET 8 Azure Function app in Azure. It’s a dotnet-isolated function running on a Linux App Service plan.
I am getting this error when trying to run the HTTP trigger function:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Azure.Core, Version=1.38.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8'. The system cannot find the file specified.
The solution consists of four projects: Application.csproj, Status.API.csproj, Domain.csproj, and Infrastructure.csproj.
Here is an example of Status.API.csproj packages
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="7.0.0" />
<PackageReference Include="Azure.Identity" Version="1.11.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.Functions.Worker" Version="7.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.21.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.1.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.20" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
I am using dotnet list package –include-transitive to try and identify what is looking for the Azure.Core 1.38 version and it tells me there is package using it but I have to manually check from there. for example Azure.Identity is using Azure.Core(>=1.38.0).
I have tried to downgrade the packages, thinking the functions are not using the lasted .NET 8 version.
I will down grade the NuGet packages version some more.
I have gone through the Functions “Diagnose and solve problems”:
Function App Down or Reporting Errors image
Garran Michaels is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.