AzureFunctions.Worker.Extensions.AspNetCore
2.0.1
dotnet add package AzureFunctions.Worker.Extensions.AspNetCore --version 2.0.1
NuGet\Install-Package AzureFunctions.Worker.Extensions.AspNetCore -Version 2.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AzureFunctions.Worker.Extensions.AspNetCore" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AzureFunctions.Worker.Extensions.AspNetCore --version 2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AzureFunctions.Worker.Extensions.AspNetCore, 2.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AzureFunctions.Worker.Extensions.AspNetCore as a Cake Addin #addin nuget:?package=AzureFunctions.Worker.Extensions.AspNetCore&version=2.0.1 // Install AzureFunctions.Worker.Extensions.AspNetCore as a Cake Tool #tool nuget:?package=AzureFunctions.Worker.Extensions.AspNetCore&version=2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ASP.NET Core middleware support
- Use ASP.NET Core built-in middlewares: UseAuthentication, UseAuthorization, or any other custom ones
- Use ASP.NET Core built-in bindings: FromQuery, FromBody, IFormFile, or any other custom ones
- Have full IActionResult/IResult integration as in MVC
NuGet package
https://www.nuget.org/packages/AzureFunctions.Worker.Extensions.AspNetCore
🔴Migration to v2 Azure Functions SDK🔴
Microsoft suggest to use FunctionsApplicationBuilder
over generic HostBuilder
that is why v2 package will only support this api.
v1
var host = new HostBuilder()
.ConfigureServices((hostingContext, services) =>
{
// additional worker services configuration
})
.ConfigureFunctionsWebApplication(worker =>
{
worker
.AddAspNetCoreIntegration()
.AddMvcOptions(mvcOptions =>
{
// additional MVC options customization
});
worker.UseAspNetCoreMiddleware(app =>
{
app.UseMiddleware<ExceptionHandlingMiddleware>(); // <-- custom ASP.NET middleware for exception handling of all HTTP triggered requests
app.UseAuthentication(); // <-- built-in ASP.NET middleware
app.UseAuthorization(); // <-- built-in ASP.NET middleware
});
})
.Build();
v2
var builder = FunctionsApplication.CreateBuilder(args);
// should be used for HTTP triggered APIs
builder.ConfigureFunctionsWebApplication();
// should be called after "ConfigureFunctionsWebApplication"
builder
.ConfigureAspNetCoreMvcIntegration()
.AddMvcOptions(mvcOptions =>
{
// additional MVC options customization
});
builder.UseAspNetCoreMiddleware(app =>
{
app.UseMiddleware<ExceptionHandlingMiddleware>(); // <-- custom ASP.NET middleware for exception handling of all HTTP triggered requests
app.UseAuthentication(); // <-- built-in ASP.NET middleware
app.UseAuthorization(); // <-- built-in ASP.NET middleware
});
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AzureFunctions.Worker.Extensions.AspNetCore:
Package | Downloads |
---|---|
AzureFunctions.Worker.Extensions.AspNetCore.ApiExplorer
Package Description |
|
AzureFunctions.Worker.Extensions.Swashbuckle
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
- Migration to .NET 9 and Azure Functions Worker v2