I have created a C# V2 Azure durable function which runs ok when I run in Visual Studio 2019. However, once deployed to Azure, I'm presented with the following:
The function runtime is unable to start. Interfaces.Avaloq.Presentation.AzureFunctions: Method not found: 'Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Azure.WebJobs.IWebJobsBuilder.get_Services()'.
In Azure, I see the following: Runtime version: 2.0.12775.0 (~2)
The package references from the cs proj are as follows:
<PackageReference Include="FluentValidation.AspNetCore" Version="8.5.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="3.0.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="1.8.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="3.0.5" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.27" />
<PackageReference Include="Base.Core.SharedKernel" Version="1.0.0.26447" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
I am building for .Net Core v2.2:
<TargetFramework>netcoreapp2.2</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
I have set a breakpoint in the "Configure" method of the "Startup" class, then attached the VS2019 debugger to the deployed Azure function. Although the breakpoint seems to be set ok (solid red circle), it is never hit.
Using the Kudu tool, I downloaded a copy of the Azure Function's eventlog.xml. Even after redeploying the Function App (using DevOps release pipeline), I continue to see the following in here:
Msvsmon was unable to start a server named '127.0.0.1:50006'. The following error occurred: An instance of the remote debugger is already running on this computer, or another process is already bound to the specified TCP/IP port
What's the best way to troubleshoot?
p.s. it seems lots of people have the same problem: https://github.com/Azure/azure-functions-dotnet-extensions/issues/29