Skip to content

[Repo Assist] Fix docs: switch to fsdocs-tool 21.0.0 to resolve namespace substitution (fixes #269)#270

Merged
dsyme merged 2 commits intomainfrom
repo-assist/fix-issue-269-fsdocs-namespaces-997c8ff770dbbe20
Mar 8, 2026
Merged

[Repo Assist] Fix docs: switch to fsdocs-tool 21.0.0 to resolve namespace substitution (fixes #269)#270
dsyme merged 2 commits intomainfrom
repo-assist/fix-issue-269-fsdocs-namespaces-997c8ff770dbbe20

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 8, 2026

🤖 This is an automated PR from Repo Assist.

Problem

The [live docs site]((fsprojects.github.io/redacted) shows {{fsdocs-list-of-namespaces}} literally instead of rendering the API namespace links. Several other template substitutions ({{fsdocs-license-link}}, {{fsdocs-release-notes-link}}) also appeared as literal text.

Root cause: fsharp.formatting.commandtool 11.4.3 embeds Microsoft.Build.Tasks.Core v15.1.0.0, which is missing the SetRidAgnosticValueForProjects task introduced in newer .NET SDK 8.x. This causes project cracking to fail silently with Warning: While cracking project files, no project files succeeded., which means no API docs are generated and no project metadata is read for template substitution.

Fix

Three minimal, targeted changes:

1. Switch to fsdocs-tool 21.0.0 (.config/dotnet-tools.json)

fsdocs-tool is the modern, separately-packaged successor to fsharp.formatting.commandtool. It:

  • Targets net8.0 (vs net5.0)
  • Uses Ionide.ProjInfo for project cracking (vs old embedded MSBuild v15.1)
  • Successfully cracks the project, enabling API doc generation and all template substitutions

The fsdocs command name is unchanged, so dotnet fsdocs build --properties Configuration=Release in publish.yml continues to work as-is.

2. Fix {{package-version}}{{fsdocs-package-version}} in docs .fsx files

The {{package-version}} key is not a built-in fsdocs substitution. The correct key is {{fsdocs-package-version}}, which fsdocs populates from the project's Version MSBuild property.

3. Add FsDocsLicenseLink and FsDocsReleaseNotesLink to project file

These explicit properties ensure the License and Release Notes nav links resolve correctly in the sidebar.

Test Status

Verified locally:

  • dotnet tool restore succeeds with fsdocs-tool 21.0.0
  • dotnet fsdocs build --properties Configuration=Release now successfully cracks the main project (using Ionide.ProjInfo)
  • Output HTML contains no unsubstituted {{fsdocs-...}} placeholders
  • License, Release Notes, and Source Repository nav links resolve to correct GitHub URLs
  • The {{fsdocs-list-of-namespaces}} substitution is performed (will populate with actual namespace links once the project DLL is built by the preceding dotnet test -c Release step in CI)

Note: In this repo-assist environment, the project DLL can't be built (sandbox permissions), so found 0 namespaces in local testing — but on actual CI the DLL is built by dotnet test -c Release before dotnet fsdocs build, so namespaces will be populated correctly.

Generated by Repo Assist for issue #269 ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@8e6d7c86bba37371d2d0eee1a23563db3e561eb5

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • fsprojects.github.io

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "fsprojects.github.io"

See Network Configuration for more information.

- Replace fsharp.formatting.commandtool 11.4.3 with fsdocs-tool 21.0.0
  The old tool used MSBuild v15.1.0.0 which can't load the
  SetRidAgnosticValueForProjects task from .NET SDK 8.x, causing project
  cracking to fail silently. fsdocs-tool 21 uses Ionide.ProjInfo
  for cracking and targets net8.0, resolving this incompatibility.
- Fix {{package-version}} -> {{fsdocs-package-version}} in all docs .fsx
  files (correct fsdocs substitution key)
- Add FsDocsLicenseLink and FsDocsReleaseNotesLink to project file so
  License and Release Notes nav links are properly populated

Closes #269

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review March 8, 2026 14:42
@dsyme dsyme merged commit 014649e into main Mar 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs list of namespaces is broken

1 participant