Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

StaticAssetsEndpointRouteBuilderExtensions.MapStaticAssets Method

Definition

Namespace:
Microsoft.AspNetCore.Builder
Assembly:
Microsoft.AspNetCore.StaticAssets.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.5.26302.115
Package:
Microsoft.AspNetCore.App.Ref v9.0.8

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Maps static files produced during the build as endpoints.

public static Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder MapStaticAssets(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string? staticAssetsManifestPath = default);
static member MapStaticAssets : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string -> Microsoft.AspNetCore.StaticAssets.StaticAssetsEndpointConventionBuilder
<Extension()>
Public Function MapStaticAssets (endpoints As IEndpointRouteBuilder, Optional staticAssetsManifestPath As String = Nothing) As StaticAssetsEndpointConventionBuilder

Parameters

staticAssetsManifestPath
String

The path to the static assets manifest file.

Returns

Remarks

The staticAssetsManifestPath can be null to use the ApplicationName to locate the manifest. As an alternative, a full path can be specified to the manifest file. If a relative path is used, we'll search for the file in the BaseDirectory.

Applies to


Feedback

Was this page helpful?