Open matthid opened 4 years ago
Lol will fix it
The problem is the generation of the default index. The docs are there, e.g. https://fsprojects.github.io/FSharp.Formatting/reference/fsharp-formatting-markdown-markdownlistkind.html
I'm not actually sure what the problem was here. Odd. I rebuilt and the docs are there now
@dsyme Unfortunate, because while trying around I noticed the same issue in https://github.com/fsharp/FAKE/pull/2538 (and hoped that would be the same issue). Maybe the code has some problems with how the projects are setup, as I managed to fix all the errors, but I only get an empty index page (nothing else)...
Hmmm are you still getting this? Can you share an output of fsdocs
?
Yes. I checkout the update_fsf
branch and then
when running dotnet fsdocs build
it said the projects are not restored
After running dotnet restore Fake.sln
it said "because it doesn't have a target path"
After running TargetPath=bin/Release/netstandard2.0 dotnet fsdocs build
it said "because it doesn't have <GenerateDocumentationFile>"
After running TargetPath=bin/Release/netstandard2.0 GenerateDocumentationFile=true dotnet fsdocs build
it seems to run without any error but it generates no docs. -> It said please set FsDocsReleaseNotesLink
, RepositoryUrl
, FsDocsLicenseLink
, this is new with the latest version, I didn't saw this with the latest update
So I added them to my directory.build.props
<Project>
<PropertyGroup>
<!-- Include PDBs in Nuget package. -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>.pdb; $(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</PropertyGroup>
<PropertyGroup>
<RepositoryUrl>https://github.com/fsharp/FAKE</RepositoryUrl>
<RepositoryBranch>release/next</RepositoryBranch>
<RepositoryType>git</RepositoryType>
<FsDocsSourceRepository>https://github.com/fsharp/FAKE</FsDocsSourceRepository>
<FsDocsSourceFolder>E:\Projects\FAKE</FsDocsSourceFolder>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<!-- Workaround The type referenced through 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard'. -->
<Reference Condition=" '$(TargetFramework)' == 'net472' " Include="netstandard" />
</ItemGroup>
</Project>
Now it fails with (which is new at the time of writing)
skipping project 'skipping project 'Fake.Documentation.DocFx.fsproj' because an error occurred while cracking it: System.Exception: error - MSBuildFailed
(1,
("E:\Projects\FAKE", "dotnet",
"msbuild E:\Projects\FAKE\src\app\Fake.Documentation.DocFx\Fake.Documentation.DocFx.fsproj /t:_Inspect_GetProperties /p:_Inspect_GetProperties_OutFile=C:\Users\matth\AppData\Local\Temp\59bc9084-57dd-476d-8883-352aeb0cebafGetProperties.txt /p:CustomAfterMicrosoftCommonTargets=C:\Users\matth\AppData\Local\Temp\acd4faab-9820-4156-94f4-6e2f9bf9c07bproj-info.hook.targets /p:CustomAfterMicrosoftCommonCrossTargetingTargets=C:\Users\matth\AppData\Local\Temp\acd4faab-9820-4156-94f4-6e2f9bf9c07bproj-info.hook.targets /nologo /verbosity:quiet /p:DesignTimeBuild=true"))
log - searching deprecated target file in 'E:\Projects\FAKE\src\app\Fake.Documentation.DocFx\obj\Fake.Documentation.DocFx.fsproj.proj-info.targets'.
writing helper target file in 'C:\Users\matth\AppData\Local\Temp\acd4faab-9820-4156-94f4-6e2f9bf9c07bproj-info.hook.targets'
E:\Projects\FAKE\src\Directory.Build.props(6,23): error MSB4066: The attribute "Include" in element <PackageReference> is unrecognized. [E:\Projects\FAKE\src\app\Fake.Documentation.DocFx\Fake.Documentation.DocFx.fsproj]
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1637.Invoke(String message) in E:\A\_work\130\s\src\fsharp\FSharp.Core\printf.fs:line 1637
at FSharp.Formatting.CommandTool.Crack.projectInfos@304.Invoke(String p) in E:\GitHub\dsyme\fsharp-core-docs\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 306skipping project '
Fake.Tools.Rsync.fsproj' because an error occurred while cracking it: System.Exception: error - MSBuildFailed
I noticed that it apparently chokes with the global package reference so I uncommented it temporarily:
<Project>
<PropertyGroup>
<!-- Include PDBs in Nuget package. -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>.pdb; $(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
<!--PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference-->
</PropertyGroup>
<PropertyGroup>
<RepositoryUrl>https://github.com/fsharp/FAKE</RepositoryUrl>
<RepositoryBranch>release/next</RepositoryBranch>
<RepositoryType>git</RepositoryType>
<FsDocsSourceRepository>https://github.com/fsharp/FAKE</FsDocsSourceRepository>
<FsDocsSourceFolder>E:\Projects\FAKE</FsDocsSourceFolder>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<!-- Workaround The type referenced through 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard'. -->
<Reference Condition=" '$(TargetFramework)' == 'net472' " Include="netstandard" />
</ItemGroup>
</Project>
And now back again: No errors in output but no reference documentation either (only an empty index page)
When I use TargetPath=bin/Release/net472 dotnet fsdocs build
, I get the following exception:
Error :
System.NullReferenceException: Object reference not set to an instance of an object.
at <StartupCode$fsdocs>.$BuildCommand.clo@450-3.GenerateNext(IEnumerable`1& next) in E:\GitHub\dsyme\fsharp-core-docs\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 555
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 371
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 403
at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
at <StartupCode$fsdocs>.$BuildCommand.clo@561-20.GenerateNext(IEnumerable`1& next) in E:\GitHub\dsyme\fsharp-core-docs\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 577
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 371
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 403
at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
at <StartupCode$fsdocs>.$BuildCommand.Convert@594.GenerateNext(IEnumerable`1& next) in E:\GitHub\dsyme\fsharp-core-docs\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 594
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 371
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 403
at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
at <StartupCode$fsdocs>.$BuildCommand.runDocContentPhase1@868-1.Invoke(Unit unitVar0) in E:\GitHub\dsyme\fsharp-core-docs\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 878
at <StartupCode$fsdocs>.$BuildCommand.protect@703(FSharpFunc`2 f) in E:\GitHub\dsyme\fsharp-core-docs\FSharp.Formatting\src\FSharp.Formatting.CommandTool\BuildCommand.fs:line 705
generating model for API docs...
But after deleting the .fsdocs
cache I get the same behavior as with netstandard2.0
OK I'll take a look. We're just using the standard project cracking logic used by ionide etc (at least I believe we are) - do you have any problem editing this solution in vscode or do all features light up?
Small comments
Could a workaround be to use a specific TargetFramework for a specific build target in order to get around the open bug?
While trying to research what I need to do to update FAKE to latest, I noticed the API reference is missing at the moment: https://fsprojects.github.io/FSharp.Formatting/reference/index.html
Does this mean this is currently not supported by the upgrade or is this just some build issue here in the repository?
Thanks for the migration docs by the way.