Skip to content

Commit 2e943e3

Browse files
mawosoftAndreyAkinshin
authored andcommitted
Fix DocFx configuration and build
- Bump DocFx version to 2.59.3 (fixes #1992) - Build BDN before building docs (fixes xref issues) - Add <ProduceReferenceAssembly> to BDN and BDN.Annotations projects (fixes xref issues) - Add filter.yml to avoid listing inherited members of System.Object for each type. - Add xrefService for resolving references to .NET SDK types.
1 parent 32ddeb5 commit 2e943e3

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

build/Program.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public void RunDocfx(FilePath docfxJson, string args = "")
202202

203203
public static class DocumentationHelper
204204
{
205-
public const string DocFxVersion = "2.57.2";
205+
public const string DocFxVersion = "2.59.3";
206206

207207
public static readonly string[] BdnAllVersions =
208208
{
@@ -454,6 +454,7 @@ public override void Run(BuildContext context)
454454
}
455455

456456
[TaskName("DocFX_Build")]
457+
[IsDependentOn(typeof(BuildTask))] // Required to fix dofx xref issues
457458
[IsDependentOn(typeof(DocfxInstallTask))]
458459
[IsDependentOn(typeof(DocfxChangelogGenerateTask))]
459460
public class DocfxChangelogBuildTask : FrostingTask<BuildContext>

docs/docfx.json

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
}
1616
],
1717
"dest": "api",
18+
"filter": "filter.yml",
1819
"properties": {
1920
"TargetFramework": "netstandard2.0"
2021
},
@@ -55,6 +56,9 @@
5556
"default",
5657
"template"
5758
],
59+
"xrefService": [
60+
"https://xref.docs.microsoft.com/query?uid={uid}"
61+
],
5862
"postProcessors": ["ExtractSearchIndex"],
5963
"markdownEngineName": "markdig",
6064
"noLangKeyword": false,

docs/filter.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiRules:
2+
- exclude:
3+
uidRegex: ^System\.Object
4+
type: member # Avoid list of inherited Object members for each type.

src/BenchmarkDotNet.Annotations/BenchmarkDotNet.Annotations.csproj

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<AssemblyName>BenchmarkDotNet.Annotations</AssemblyName>
88
<PackageId>BenchmarkDotNet.Annotations</PackageId>
99
<RootNamespace>BenchmarkDotNet</RootNamespace>
10+
<!-- needed for docfx xref resolver -->
11+
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
1012
</PropertyGroup>
1113
<ItemGroup>
1214
<Compile Include="..\BenchmarkDotNet\Helpers\CodeAnnotations.cs" Link="Attributes\CodeAnnotations.cs" />

src/BenchmarkDotNet/BenchmarkDotNet.csproj

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<AssemblyName>BenchmarkDotNet</AssemblyName>
99
<PackageId>BenchmarkDotNet</PackageId>
1010
<RootNamespace>BenchmarkDotNet</RootNamespace>
11+
<!-- needed for docfx xref resolver -->
12+
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
1113
</PropertyGroup>
1214
<ItemGroup>
1315
<EmbeddedResource Include="Templates\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />

0 commit comments

Comments
 (0)