Closed davedawkins closed 1 year ago
I got Visual Studio to rebuild the solution file (removed the Sutil main project and re-added it). I may be able to diff and report back
Hello, when using 6.0.404
I'm not sure you can use the 17.x
version.
17 has a dependency on FCS 42.7.101
which takes a dependency on MSBuild 17.4 packages.
So the MSBuild you bring in is more recent than the one your SDK uses.
I'm not 100% sure that is the problem you have but that seems likely.
When going with 16.1.1
and 6.0.404
I think the MSBuild libraries will resolve fine.
There your script is trying to generate API docs for a netstandard
. Building Sutil
won't output any referenced DLLs as a console app would do. To generate the documentation you do need to resolve any additional missing references. (Looks like https://github.com/fsprojects/FSharp.Formatting/issues/680)
I cloned your repo, and create a console app that references Sutil
. Build that project and added the missing references:
#r "nuget: FSharp.Formatting, 16.1.1"
open FSharp.Formatting.ApiDocs
open System.IO
let file = "./Entry/bin/Release/net6.0/Sutil.dll"
let input = ApiDocInput.FromFile(file)
let references =
[
"Browser.Blob.dll"
"Browser.Css.dll"
"Browser.Dom.dll"
"Browser.Event.dll"
"Browser.Gamepad.dll"
"er.MediaQueryList.dll"
"Browser.Svg.dll"
"Browser.WebStorage.dll"
"ConstructStyleSheetsPolyfill.dll"
"Fable.Core.dll"
"Fable.Promise.dll"
"Feliz.Engine.Bulma.dll"
"Feliz.Engine.dll"
"Feliz.Engine.Event.dll"
"FSharp.Core.dll"
]
|> List.map (fun dep ->
Path.Combine(__SOURCE_DIRECTORY__, "Entry/bin/Release/net6.0", dep)
|> sprintf "-r:%s")
ApiDocs.GenerateHtml(
[ input ],
output = "./apidocs/output",
collectionName = "Sutil",
// template = Path.Combine("apidocs", "templates", "template.html"),
substitutions = [],
otherFlags = references
)
This was generating documentation for me.
@baronfel FCS has a preview version on NuGet without any deps to MSBuild. Do we want to upgrade to that?
I'd like to get @kevinransom to push a stable version, but yeah that should be the path forward.
Thank you everyone for taking a look - I closed it because I found I was suffering from a mixture of dotnet version, fsdocs version and corrupted solution file. @nojaf You worked hard on that, thank you, that's amazing. 🙏
Have tried using
dotnet fsdocs build
My
gendoc.fsx
script:What am I doing wrong? Feel free to check out and build Sutil