Skip to content

fsdocs build does not discover projects from .slnx solution files #1212

@sangkilc

Description

@sangkilc

fsdocs build currently auto-discovers projects from a solution only when the working directory contains exactly one .sln file.

With the newer .slnx solution format, project cracking falls back to the shallow *.fsproj directory scan instead of loading projects from the solution. This can miss projects that are included in the solution but live outside the fallback scan depth.

Relevant line:

match Directory.GetFiles(slnDir, "*.sln") with

Possible single-line patch

--- a/src/fsdocs-tool/ProjectCracker.fs
+++ b/src/fsdocs-tool/ProjectCracker.fs
@@ -507,7 +507,7 @@ module Crack =
         let collectionName, projectFiles =
             match projects, ignoreProjects with
             | [], false ->
-                match Directory.GetFiles(slnDir, "*.sln") with
+                match Array.append (Directory.GetFiles(slnDir, "*.sln")) (Directory.GetFiles(slnDir, "*.slnx")) with
                 | [| sln |] ->
                     printfn "getting projects from solution file %s" sln

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions