docfx
docfx copied to clipboard
Support F# 5 / 6
Operating System: Windows
DocFX Version Used: 5.29.2
Template used: default + statictoc
Steps to Reproduce:
- Create F# project
- Use language features such as string interpolation (F# 5)
- Create docfx project and specify the
.fsprojfile in thedocfx.json - 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).
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)
in your
.fsprojfile use<GenerateDocumentationFile>true</GenerateDocumentationFile>to generate XML
That is the expected approach. Maybe time to close the issue.
Close with the drop of fsproj support: https://github.com/dotnet/docfx/pull/8375