dotnet/aspnetcore · critical · NotImplementedException

The type {GetType().FullName} does not support supplying {na

Error message

The type {GetType().FullName} does not support supplying {nameof(NavigationOptions)}. To add support, that type should override {nameof(NavigateToCore)}(string uri, {nameof(NavigationOptions)} options).

What it means

The base NavigationManager.NavigateToCore(string uri, NavigationOptions options) is not implemented and throws NotImplementedException. Subclasses that only overrode the legacy (string, bool) overload will hit this when a caller supplies NavigationOptions. The message instructs the subclass author to override the options-aware overload.

Source

Thrown at src/Components/Components/src/NavigationManager.cs:245

    /// </summary>
    /// <param name="uri">The destination URI. This can be absolute, or relative to the base URI
    /// (as returned by <see cref="BaseUri"/>).</param>
    /// <param name="forceLoad">If true, bypasses client-side routing and forces the browser to load the new page from the server, whether or not the URI would normally be handled by the client-side router.</param>
    // The reason this overload exists and is virtual is for back-compat with < 6.0. Existing NavigationManager subclasses may
    // already override this, so the framework needs to keep using it for the cases when only pre-6.0 options are used.
    // However, for anyone implementing a new NavigationManager post-6.0, we don't want them to have to override this
    // overload any more, so there's now a default implementation that calls the updated overload.
    protected virtual void NavigateToCore([StringSyntax(StringSyntaxAttribute.Uri)] string uri, bool forceLoad)
        => NavigateToCore(uri, new NavigationOptions { ForceLoad = forceLoad });

    /// <summary>
    /// Navigates to the specified URI.
    /// </summary>
    /// <param name="uri">The destination URI. This can be absolute, or relative to the base URI
    /// (as returned by <see cref="BaseUri"/>).</param>
    /// <param name="options">Provides additional <see cref="NavigationOptions"/>.</param>
    protected virtual void NavigateToCore([StringSyntax(StringSyntaxAttribute.Uri)] string uri, NavigationOptions options) =>
        throw new NotImplementedException($"The type {GetType().FullName} does not support supplying {nameof(NavigationOptions)}. To add support, that type should override {nameof(NavigateToCore)}(string uri, {nameof(NavigationOptions)} options).");

    /// <summary>
    /// Refreshes the current page via request to the server.
    /// </summary>
    /// <remarks>
    /// If <paramref name="forceReload"/> is <c>true</c>, a full page reload will always be performed.
    /// Otherwise, the response HTML may be merged with the document's existing HTML to preserve client-side state,
    /// falling back on a full page reload if necessary.
    /// </remarks>
    public virtual void Refresh(bool forceReload = false)
        => NavigateTo(Uri, forceLoad: true, replace: true);

    /// <summary>
    /// Handles setting the NotFound state.
    /// </summary>
    public void NotFound() => NotFoundCore();

    private void NotFoundCore()

View on GitHub (pinned to 294cab2f9b)

Solutions

  1. Override protected override void NavigateToCore(string uri, NavigationOptions options) in your NavigationManager subclass.
  2. If you cannot change the subclass, avoid NavigateTo overloads that take NavigationOptions and use the (string, bool) overload instead.
  3. Update test doubles/stubs to implement the options overload.

Example fix

// before
public class MyNavManager : NavigationManager
{
    protected override void NavigateToCore(string uri, bool forceLoad) { /* ... */ }
}

// after
public class MyNavManager : NavigationManager
{
    protected override void NavigateToCore(string uri, bool forceLoad) { /* ... */ }
    protected override void NavigateToCore(string uri, NavigationOptions options)
        => NavigateToCore(uri, options.ForceLoad); // or full impl
}
Defensive patterns

Strategy: type-guard

Validate before calling

static bool SupportsOptions(NavigationManager nm) =>
    nm.GetType().GetMethod("NavigateToCore",
        BindingFlags.Instance | BindingFlags.NonPublic,
        null, new[] { typeof(string), typeof(NavigationOptions) }, null)?.DeclaringType != typeof(NavigationManager);

Type guard

static bool IsFullNavigationManager(NavigationManager nm) =>
    nm.GetType().GetMethod("NavigateToCore",
        System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic,
        null, new[] { typeof(string), typeof(NavigationOptions) }, null)?.DeclaringType != typeof(NavigationManager);

Try / catch

try { navManager.NavigateTo(uri, options); }
catch (NotImplementedException ex) when (ex.Message.Contains("NavigationOptions"))
{ navManager.NavigateTo(uri, options.ForceLoad); /* fall back to legacy overload */ }

Prevention

When it happens

Trigger: Calling NavigateTo(uri, new NavigationOptions { ... }) on a custom NavigationManager subclass that only overrides NavigateToCore(string, bool); using Refresh() or replace=true on such a subclass (which routes through the options overload); a third-party/host NavigationManager that predates .NET 6.

Common situations: Custom NavigationManager in a nonstandard host (MAUI, custom server, test double) written against <6.0 APIs; upgrading the framework but not the host subclass; unit tests using a hand-rolled stub NavigationManager.

Related errors


AI-assisted analysis of dotnet/aspnetcore@294cab2f9b (2026-08-06). Data as JSON: /api/errors/dc50af56922b8125. Report an issue: GitHub.