Skip to content

Commit 98f8e2c

Browse files
committed
fix: update docfx.json for DocFX v2 compatibility
- Add DocFxForUnity.csproj (netstandard2.1) and unignore it: DocFX v2 uses MSBuildWorkspace when given a .csproj instead of raw .cs globs - Add allowCompilationErrors: true so DocFX continues despite missing UnityEngine assembly references - Add disableGitFeatures: true to avoid git-related failures in CI - Replace retired xref.docs.microsoft.com xrefService with the new learn.microsoft.com .NET xrefmap - Keep UnityXrefMaps xref for Unity API cross-references https://claude.ai/code/session_01HDAawqjLMudEktivP5ifXw
1 parent 70ce8cf commit 98f8e2c

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Packages/*
3131
ExportedObj/
3232
.consulo/
3333
*.csproj
34+
!DocFxForUnity.csproj
3435
*.unityproj
3536
*.sln
3637
*.suo

DocFxForUnity.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>netstandard2.1</TargetFramework>
4+
</PropertyGroup>
5+
</Project>

Documentation/docfx.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
{
66
"src": "..",
77
"files": [
8-
"Assets/**/*.cs"
9-
],
10-
"exclude": [
11-
"Assets/Plugins/**"
8+
"DocFxForUnity.csproj"
129
]
1310
}
1411
],
1512
"globalNamespaceId": "Global",
1613
"filter": "filterConfig.yml",
17-
"dest": "api"
14+
"dest": "api",
15+
"allowCompilationErrors": true,
16+
"disableGitFeatures": true
1817
}
1918
],
2019
"build": {
@@ -71,11 +70,9 @@
7170
}
7271
},
7372
"xref": [
74-
"https://normanderwan.github.io/UnityXrefMaps/xrefmap.yml"
75-
],
76-
"xrefService": [
77-
"https://xref.docs.microsoft.com/query?uid={uid}"
73+
"https://normanderwan.github.io/UnityXrefMaps/xrefmap.yml",
74+
"https://learn.microsoft.com/en-us/dotnet/.xrefmap.json"
7875
],
7976
"dest": "../_site"
8077
}
81-
}
78+
}

0 commit comments

Comments
 (0)