How to create documentation for other projects as part of a solution using DocFx

I am using DocFx to automatically generate documentation in Visual Studio 2015.

In the Getting Started instruction, I added an empty ASP.NET 4 web application and used the Nuget Console to install the DocFx build package (for example, Install-Package docfx.msbuild ). I created a site and he created documentation for the code inside the project.

I was wondering how to configure docfx.json to force DocFx to document code in other projects as part of the solution.

+7
documentation-generation docfx
source share
1 answer

There is an metadata array in docfx.json. The metadata example has an src object with files and exclude properties.

To point to another project in your solution, add the cwd property to metadata and change the folders (ie "../Another.Project").

{ "metadata": [ { "src": [ { "files": [ "**/*.csproj" ], "exclude": [ "**/bin/**", "**/obj/**", "_site/**" ], "cwd": "../Another.Project" } ], "dest": "obj/api" } ], "build": ... }

+11
source share

All Articles