docfx icon indicating copy to clipboard operation
docfx copied to clipboard

Support F# 5 / 6

Open f-messner opened this issue 3 years ago • 2 comments

Operating System: Windows

DocFX Version Used: 5.29.2

Template used: default + statictoc

Steps to Reproduce:

  1. Create F# project
  2. Use language features such as string interpolation (F# 5)
  3. Create docfx project and specify the .fsproj file in the docfx.json
  4. Try to run docfx

Expected Behavior: The documentation is generated.

Actual Behavior: Error messages and no documentation generated.

I expect this is because of outdated references? The project seems to reference FSharp.Compiler.Service version="17.0.1", the current version is 41.0.4 (and supports F# 6) An earlier commit (https://github.com/dotnet/docfx/commit/ffba70567a8157e659b78d6254d88ac8efeeec4a) to update to 34.1.1 seems to have been reverted (I don't know why).

f-messner avatar May 11 '22 14:05 f-messner

I did by now find a workaround however: in your .fsproj file use <GenerateDocumentationFile>true</GenerateDocumentationFile> to generate XML files holding the doc information after building. Then in docfx.json for metadata use something like

"metadata": [
    {
      "src": [
        {
          "files": ["*/bin/Debug/*/*.dll"],
          "src": "../src"
        }
      ],
      "dest": "api"
    }
  ],

(We're using multiple projects, thus the wildcards)

f-messner avatar May 13 '22 08:05 f-messner

in your .fsproj file use <GenerateDocumentationFile>true</GenerateDocumentationFile> to generate XML

That is the expected approach. Maybe time to close the issue.

paulushub avatar Jul 12 '22 20:07 paulushub

Close with the drop of fsproj support: https://github.com/dotnet/docfx/pull/8375

yufeih avatar Jan 30 '23 13:01 yufeih