Error in Azure Function App VS 2019 .NET 3.0 - Method not found: 'IFunctionsHostBuilder.get_Services()'
For now,ASP.NET Core 3.0 not currently available for Azure App Service, check this Microsoft doc.
Azure Functions 3.0, which will be fully compatible with Core 3.0, will be available in October, check here. However it's not released now.
From this issue, you could find Azure Function 2.0 right now does not work with any Microsoft.Extensions.* 3.* packages and cannot share code with .Net Core 3.0 services.
Further more information about Azure Fuction 3.0 check this discussion.
You can now use .net core 3.0 to create azure functions. Update Microsoft.NET.Sdk.Functions
to 1.0.30-beta2
and set AzureFunctionsVersion
to v3-preview
.
Read more about Develop Azure Functions using .NET Core 3.0 here
You can now use DI using IFunctionsHostBuilder
using Microsoft.Azure.Functions.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
[assembly: FunctionsStartup(typeof(BI_Geo.AzureFunctions.Startup))]
namespace BI_Geo.AzureFunctions
{
public class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
builder.Services.AddScoped<IProcess, Process>();
}
}
}