Skip to content

Fix invalid moniker syntax in options.md#36893

Merged
wadepickett merged 3 commits intomainfrom
copilot/fix-invalid-moniker-syntax
Mar 18, 2026
Merged

Fix invalid moniker syntax in options.md#36893
wadepickett merged 3 commits intomainfrom
copilot/fix-invalid-moniker-syntax

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 18, 2026

A hyphenated :::moniker-range directive on line 1399 of options.md is not recognized by the Learn build system, causing raw moniker syntax to render on the published page.

  • Changed :::moniker-range=">= aspnetcore-8.0":::moniker range=">= aspnetcore-8.0" (hyphen → space), matching the syntax used by all other ~30 moniker directives in the file.
Original prompt

This section details on the original issue you should resolve

<issue_title>Invalid moniker syntax in ASP.NET Core documentation</issue_title>
<issue_description>### Description

Image Image

Page URL

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-8.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/configuration/options.md

Document ID

dc7e3449-650b-d117-5eac-69e5ccb250cb

Platform Id

c815d451-e2c8-0cf1-5862-03b12dd0392a

Article author

@tdykstra

Metadata

Comments on the Issue (you are @copilot in this section)

@wadepickett Thanks @FelixEckl for creating this issue and showing details. We will get this fixed! @wadepickett ## 🤖 AI Triage Summary

📌 Note to community: This is an automated preliminary analysis to help our documentation team quickly review, determine scope and prioritize this issue. This report is not a resolution or answer to your question—it's an internal triage tool that identifies potentially relevant docs, code samples, and versions to look into. A team member will review this issue and respond. Thank you for your contribution!


This preliminary assessment report was run by: @wadepickett
Date: 2026-03-18
Issue: #36892
Model: GitHub Copilot


Issue Analysis: Invalid moniker syntax in ASP.NET Core Options Pattern documentation

✅ Issue Validation

Status: Valid and actionable

📋 Issue Summary

The ASP.NET Core Options Pattern documentation file (options.md) contains an invalid moniker syntax on line 1399. The directive uses :::moniker-range=">= aspnetcore-8.0" (hyphenated moniker-range) instead of the correct syntax :::moniker range=">= aspnetcore-8.0" (space-separated moniker range). This causes the Microsoft Learn build system to fail to recognize the moniker directive, resulting in the raw moniker syntax being rendered on the published page rather than properly conditionally displaying content for ASP.NET Core 8.0+. All other moniker directives in the file (over 30 occurrences) correctly use the :::moniker range syntax with a space.

📁 Potentially Affected Files

These files have been identified as possibly related to this issue and may need review.

File Path Lines Section
Main article aspnetcore/fundamentals/configuration/options.md 1399 "Validate options in a dedicated class with IValidateOptions<TOptions>"

📝 Preliminary Change Assessment

The following are initial observations for the documentation team to evaluate—not final decisions.

Potential documentation Updates

File: aspnetcore/fundamentals/configuration/options.md
Location: Line 1399 (within the "Validate options in a dedicated class with IValidateOptions<TOptions>" section)
Type: Replacement (typo fix)

Current content (line 1399):

:::moniker-range=">= aspnetcore-8.0"

Suggested direction:

:::moniker range=">= aspnetcore-8.0"

🎯 Suggested Action Plan

For documentation team review

  1. Review existing PR: PR dotnet/AspNetCore.Docs#36891

    • The issue submitter has already opened a PR that changes :::moniker-range to :::moniker range on line 1399.
    • The PR modifies exactly 1 file with 1 addition and 1 deletion — the minimal correct fix.
    • Consider reviewing and merging this PR.
  2. Verify the fix on the published page:

    • After merging, confirm that the "Validate options in a dedicated class" section correctly renders the OptionsValidation2.razor example for the >= aspnetcore-8.0 moniker on the published article.

⚠️ Review Considerations

  • This is a single-character fix (hyphen → space) that affects moniker-conditional rendering.
  • The invalid syntax causes the OptionsValidation2.razor Blazor example in the "V...

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.


Internal previews

📄 File 🔗 Preview link
aspnetcore/fundamentals/configuration/options.md Options pattern in ASP.NET Core

… in options.md

Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix invalid moniker syntax in ASP.NET Core documentation Fix invalid moniker syntax in options.md Mar 18, 2026
Copilot AI requested a review from wadepickett March 18, 2026 15:50
@wadepickett wadepickett marked this pull request as ready for review March 18, 2026 15:50
Copy link
Copy Markdown
Contributor

@wadepickett wadepickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@wadepickett wadepickett merged commit 6551004 into main Mar 18, 2026
4 checks passed
@wadepickett wadepickett deleted the copilot/fix-invalid-moniker-syntax branch March 18, 2026 18:35
@wadepickett
Copy link
Copy Markdown
Contributor

Thanks @FelixEckl for raising this issue and offering to fix it. Greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid moniker syntax in ASP.NET Core documentation

3 participants