Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate documentation for other projects within solution using DocFx

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

Per the Getting Started instructions, I added an empty ASP.NET 4 Web Application and used the Nuget Console to install the DocFx build package (e.g. Install-Package docfx.msbuild). I built the site and it it generated documentation for code within the project.

I was wondering how to configure docfx.json to get DocFx to document code in other projects within the solution.

like image 925
dalenewman Avatar asked Feb 23 '16 22:02

dalenewman


Video Answer


1 Answers

In docfx.json, there is an array of metadata. The example metadata has a src object with files and exclude properties.

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

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

like image 72
dalenewman Avatar answered Oct 19 '22 04:10

dalenewman