dotnet / dotnet/docfx

exclude files from csproj

Open
#3,108 5 comments 0 reactions 0 assignees View on GitHub
dotnet
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 9m
Merged PRs (30d)
11

Description

**DocFX Version Used**: 2.36.2 (nuget)

**Template used**: `default`

**Steps to Reproduce**:

I'm trying to use docfx to generate code from assemblies and a unity project using these assemblies through several src entries (all through one docfx.json file).
For example, let's say I have a class A in
`"src": [
{
"files": [
"**.csproj"
],
"src": "..\\pathTo\\MyLibrarySource"
}
],
"dest": "api-library",
"globalNamespaceId": "Global",`
This works as expected

I have an src entry for the unity part but I can't get it to work

If I include all cs files of my unity project, I can exclude some. For example, if I have a class B that inherits from A in :

`"src": [
{
"files": [
"Assets/MyScriptDir/**/**.cs",
],
"exclude": [
"**/Editor/**"
],
"src": "..\\..\\Unity"
}
],
"dest": "api-unity",
"globalNamespaceId": "Global",`

docfx will make a documentation where B inherits from Object, not from A

So I tried to use the csproj generated by unity to solve this:
"src": [
{
"files": [
"*.csproj"
],
"exclude": [
"**/Editor/**",
],
"src": "..\\..\\Unity"
}
],
"dest": "api-unity",
"globalNamespaceId": "Global"

This time, docfx correctly says that B inherits from A but my exclude is ignored.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.