Hello, I am doing the upgrade of my project from .netcore3.1 to .net7 (isolated process), azure functions from v3 to v4 and CosmoDB to v4.
After changing every Microsoft.Azure.WebJobs.Extensions.* reference to the corresponding Microsoft.Azure.Functions.Worker.Extensions.*, trying to run one of my azure function I am still getting this error:

This is what I have in my .csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<ImplicitUsings>enabled</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="8.0.0" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.2.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.20.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.CosmosDB" Version="4.6.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues" Version="5.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Blobs" Version="6.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Tables" Version="1.2.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.1.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.16.4" />
</ItemGroup>
...
</Project>
And here is how I am using the CosmosDBTrigger:
[Function("StartUploadingProcess")]
public async Task Run(
[CosmosDBTrigger(
databaseName: "%CosmosDb_databaseId%",
containerName: "SalesInvoices",
Connection = "CosmosDb_connectionString",
LeaseContainerName = "SalesInvoicesLeases",
LeasesContainerThroughput = 500,
CreateLeaseContainerIfNotExists = true)]
IReadOnlyList<Document> input,
FunctionContext executionContext)
{
if (input != null && input.Count > 0)
{...}
...
}
Can someone help with this issue?
Thanks a lot.