Azure.Deployments.Extensibility.AspNetCore 0.1.191

Prefix Reserved
dotnet add package Azure.Deployments.Extensibility.AspNetCore --version 0.1.191
                    
NuGet\Install-Package Azure.Deployments.Extensibility.AspNetCore -Version 0.1.191
                    
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="Azure.Deployments.Extensibility.AspNetCore" Version="0.1.191" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Azure.Deployments.Extensibility.AspNetCore" Version="0.1.191" />
                    
Directory.Packages.props
<PackageReference Include="Azure.Deployments.Extensibility.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Azure.Deployments.Extensibility.AspNetCore --version 0.1.191
                    
#r "nuget: Azure.Deployments.Extensibility.AspNetCore, 0.1.191"
                    
#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.
#:package Azure.Deployments.Extensibility.AspNetCore@0.1.191
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Azure.Deployments.Extensibility.AspNetCore&version=0.1.191
                    
Install as a Cake Addin
#tool nuget:?package=Azure.Deployments.Extensibility.AspNetCore&version=0.1.191
                    
Install as a Cake Tool

Azure.Deployments.Extensibility.AspNetCore

Version-free ASP.NET Core runtime for Bicep extension hosting packages. It provides immutable handler registration, middleware, request routing, typed handlers, and behavior dispatch on top of the Core SDK.

Third-party and local extension authors should use Azure.Deployments.Extensibility.Hosting.Managed, which configures this package with project identity, exact-version dispatch, startup validation, and health checks.

Hosting package composition

builder.Services.AddBicepExtensionServices();

var registration = BicepExtensionRegistration.Create(
    builder.Services,
    extension => extension
        .ForResourceType("Fortune", resourceType => resourceType
            .AddHandler<FortunePreviewHandler>()
            .AddHandler<FortuneCreateOrUpdateHandler>()
            .AddHandler<FortuneGetHandler>()
            .AddHandler<FortuneDeleteHandler>()));

builder.Services.AddSingleton<IBicepExtensionResolver>(
    new HostingPolicyResolver(registration));

var app = builder.Build();
app.UseBicepExtensionMiddlewares();
app.MapBicepExtensionEndpoints();

The host owns version policy through IBicepExtensionResolver. The base runtime treats the route version as an opaque string.

Key concepts

Handler registration

Register handlers in one immutable, version-independent registration. The runtime detects which handler interfaces each class implements (IResourcePreviewHandler, IResourceCreateOrUpdateHandler, IResourceGetHandler, IResourceDeleteHandler, ILongRunningOperationGetHandler).

var registration = BicepExtensionRegistration.Create(services, extension => extension
    .AddHandler<FallbackHandler>()
    .ForResourceType("Employee", type => type
        .AddHandler<EmployeePreviewHandler>()
        .AddHandler<EmployeeCreateOrUpdateHandler>()));

Typed handler base classes

Extend one of the typed base classes to work with strongly-typed models instead of raw JsonObject:

Base class Operation
TypedResourcePreviewHandler<TProperties, TIdentifiers> Preview
TypedResourceCreateOrUpdateHandler<TProperties, TIdentifiers> Create or update
TypedResourceGetHandler<TProperties, TIdentifiers> Get
TypedResourceDeleteHandler<TProperties, TIdentifiers> Delete

Each base class automatically deserializes the request and serializes the response using the ASP.NET Core JsonOptions.

Behaviors (decorators)

Behaviors wrap handler invocations for cross-cutting concerns such as validation, logging, or authorization. They execute in order: global → registration-scoped → resource-type-scoped.

services.AddBicepExtensionGlobalHandlerBehavior<LoggingBehavior>();

var registration = BicepExtensionRegistration.Create(services, extension => extension
    .AddHandlerBehavior<ApiVersionValidationBehavior>()
    .ForResourceType("Fortune", type => type
        .AddHandlerBehavior<FortuneAuthorizationBehavior>()
        .AddHandler<FortuneCreateOrUpdateHandler>()));

Implement IResourcePreviewBehavior, IResourceCreateOrUpdateBehavior, IResourceGetBehavior, IResourceDeleteBehavior, or ILongRunningOperationGetBehavior as needed. A single class can implement multiple behavior interfaces.

Scalar API explorer

Hosting packages can reuse the shared development-time Scalar UI and OpenAPI document:

BicepExtensionApiExplorer.MapDevelopment(app, explorer => explorer
    .WithTitle("My Extension API")
    .WithExtensionVersions("1.0.0", "2.0.0")
    .ConfigureExamples(MyExtensionExamples.Configure));

The host supplies the version examples according to its routing policy. Managed hosting supplies its exact assembly version automatically; FirstParty hosting can supply all supported version examples.

Request headers

Read extensibility request headers using HttpContextExtensions:

var clientRequestId = httpContext.GetClientRequestId();
var correlationId = httpContext.GetCorrelationRequestId();
var tenantId = httpContext.GetClientTenantId();

Documentation

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Azure.Deployments.Extensibility.AspNetCore:

Package Downloads
Azure.Deployments.Extensibility.Extensions.Kubernetes

Package Description

Azure.Deployments.Extensibility.Hosting.Managed

Managed hosting SDK for building third-party and local Bicep extensions on ASP.NET Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.191 45 8/13/2026
0.1.168 150 6/25/2026
0.1.167 140 6/24/2026
0.1.147 159 4/17/2026
0.1.135 150 3/23/2026
0.1.115 273 12/22/2025
0.1.113 197 12/12/2025
0.1.102 250 10/23/2025
0.1.67 288 1/31/2025
0.1.55 288 6/24/2024