docfx | Static site generator for .NET API documentation | REST library
kandi X-RAY | docfx Summary
kandi X-RAY | docfx Summary
DocFX makes it extremely easy to generate your developer hub with a landing page, API reference, and conceptual documentation, from a variety of sources.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of docfx
docfx Key Features
docfx Examples and Code Snippets
Community Discussions
Trending Discussions on docfx
QUESTION
So I have a docfx.json
which is configured correctly and targets the correct directories. What I'm wondering is how can I generate site using that docfx.json
from scratch.
E.g. I have a blank directory with just the docfx.json
in it and want to generate all the site and documentation using that docfx.json
.
Like using the docfx init
command but instead of generating a blank site I generate the site using the existing docfx.json
.
ANSWER
Answered 2022-Mar-23 at 09:43You need to manually do the setup yourself. See more info on how to do that here
QUESTION
I have a product with multiple repositories, each distributed as a NuGet package. I would like to establish a separate repository for DocFx, which generates the documentation from the NuGet packages. That way, it can consolidate the documentation for multiple { repositories, projects, packages } into one location, while also allowing conceptual documentation to be updated independent of the package release cycle.
TL;DR: I am able to get DocFx to correctly generate the reference documentation based on the assemblies in the NuGet package, but it doesn't include any of the XML documentation (i.e., from ///
metadata). How do I solve this? Details below.
To pursue this, I first ensured that the csproj
files for the source projects were configured to generate the XML documentation as part of the build output:
ANSWER
Answered 2022-Jan-06 at 09:25If you specify an assembly in the metadata
configuration, DocFx will look for the XML documentation in the same directory (source). The problem, however, is that when you include a NuGet reference, that XML documentation isn't included in your project's bin
folder, even if it's included in the NuGet package. As a result, while DocFx is able to identify the structure, it is not able to identify the documentation.
TL;DR: To resolve this, you can configure msbuild
to copy the XML documentation to the bin
folder, ensuring DocFx has access to it (example). Details below.
When you reference a NuGet package, by default, the package is downloaded, unzipped, and cached in the following location:
QUESTION
This question is the same as this question. But the OP answered his own question and it didn't help me.
I am trying to create a documentation similar to the Docfx site:
However, when I build the project, I get the index.html that looks like this:
My configuration is this:
- Installed docfx.console as a nuget package in Visual Studio 2017 for the project.
- The version of docfx is 2.58.0.
- I'm building the project in Visual Studio, which produces the docfx output.
My folder configuration is:
...ANSWER
Answered 2021-Sep-01 at 01:10The only way I have ever been able to get that to happen:
Change articles/toc.md to articles/toc.yml:
QUESTION
I am working on a Xamarin Forms project with Android target using Azure DevOps for CI. My project builds well in my local machine and also in the Azure Pipeline. Now, I would like to generate the code documentation with DocFx. So, I configured a powershell script to download docfx.console tool and execute it from my docfx.json file. The script works well on my local machine and the documentation is correctly generated.
I added a task in my Azure Pipeline to execute my powershell script and DocFx failed with a FileNotFoundException which concern the System.Buffers.dll file with the following logs:
...ANSWER
Answered 2021-Apr-21 at 14:53This issue was a warning masked on my local machine by the log level which is higher in the pipeline. Finally the generation of the documentation works well. But the mystery persists around this warning. I close the subject but if someone have an idea concerning this warning... It's still strange
QUESTION
Is there a way to generate a solution and project file out of a folder structure through a azure pipeline .ymal stage?
The way the project has been set up is that there are lots of other .git repos set up inside a master repo and inserted though subtrees. These repos don't have a .sln in themselves but instead when they are added into Unity they get added into the projects .sln and a .csproj is generated for each of the assemblies within the submodule (package)
What I'm looking to do is to have documentation generated for each of these submodules whenever an update is pushed to its master (not the projects it lives in master) as these tend to be more utilities and self contained systems. Problem I'm facing is that I can trigger all the documentation system with docFX but because this module does not contain a .csproj I'm unable to generate the documentation for it. so I'm wondering if its possible to have a step where I can create a project file for all scripts that are within a folder structure, and as such then have a project file for docFX to work of.
I know its not ideal in any sense, but wondering if its a possibility while I investigate further into other solutions.
...ANSWER
Answered 2021-Feb-10 at 07:28Is there a way to generate a solution and project file out of a folder structure through a azure pipeline .ymal stage?
For this issue, I am afraid that azure pipeline is impossible to achieve this.
".csproj" is a Visual Studio .NET C# Project file extension. This file will have information about the files included in that project, assemblies used in that project, project GUID and project version etc. This file is related to your project. It will be automatically generated when we create
".sln" is a structure for organizing projects in Visual Studio. It contains the state information for projects in .sln (text-based, shared) and .suo (binary, user-specific solution options) files. We can add multiple projects inside one solution.
Azure pipeline cannot generate a solution and project file according to the folder structure.
QUESTION
How to document Union type in typescript so typedoc
can pull/show relevant info? This below is a JSDoc reference but is there one for TSDoc?
Example
...ANSWER
Answered 2021-Feb-03 at 11:55It appears that it doesn't matter what comments we put there the DocFx is unable to generate pages for type aliases and functions but only for classes, interfaces, etc ... at least at the specified version.
I have confirmed this by inspecting the generated *.json
output file and the resulting *.yml
files. All mentioned files include the metadata but the docfx doesn't generate the html pages for them the right way.
Now I'm using only typedoc
with typedoc-plugin-markdown
to generate docs and its working fine in its own capacity.
QUESTION
Whenever I try to build any documentation using docfx, I get the following error in the metadata
build step that uses msbuild to analyze the xml comments in the code of the csprojs:
Warning:MetadataCommand.ExtractMetadataWorkspace failed with: [Failure] Msbuild failed when processing the file 'C:\temp\docfxtest\docfx_project\src\src.csproj' with message: Could not load SDK Resolver. A manifest file exists, but the path to the SDK Resolver DLL file could not be found. Manifest file path 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\SdkResolvers\Microsoft.Build.NuGetSdkResolver\Microsoft.Build.NuGetSdkResolver.xml'. SDK resolver path: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\Microsoft\NuGet\Microsoft.Build.NuGetSdkResolver.dll C:\temp\docfxtest\docfx_project\src\src.csproj
It seems that msbuild cannot be correctly resolved by docfx. Any idea how I could fix this?
Im using docfx version 2.56.5.0 on Windows and I also have VS Enterprise 2019 (16.8.2) and VS Build Tools 2017 (15.9.29) installed:
UPDATE:
I have now uninstalled the VS 2017 build tools completely and repaired the VS 2019 installation using the installer. I now get a different error when I run docfx. It seems that it can't find msbuild at all anymore.
Warning:MetadataCommand.ExtractMetadataWorkspace failed with: [Failure] Msbuild failed when processing the file 'C:\temp\docfxtest\docfx_project\src\src.csproj' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found. C:\temp\docfxtest\docfx_project\src\src.csproj
Running msbuild -t:restore,build
also shows that it can't find msbuild
'msbuild' is not recognized as an internal or external command
The targets are isntalled:
And so is the .NET Core workload:
...ANSWER
Answered 2020-Nov-30 at 09:05Your Build Tool for VS2017 might have some problems due to some issues. The most issue is this:
QUESTION
I get a failure for the stage 'Static analysis' during my jenkins-pipeline.
Here is my Jenkinsfile :
...ANSWER
Answered 2020-Nov-21 at 17:16After investigation, it seems "androidLint" is not supported by "Warnings Next Generation Plugin", and has been replaced by "androidLintParser"
the correct step with Warning Next Generation plugin is :
QUESTION
I have a DocFx project folder which contains all the correct files to host the project.
On my laptop, I'm able to use the code docfx docfx.json --serve
to host the project on my localhost completely fine. However on my PC it errors out.
I'm syncing my files using GitHub, so the files / file locations are identical. Also Initially it worked on my PC, then it stopped...
The error I'm getting is this:
[20-10-10 04:54:46.403]Error:System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Windows\System32\docfx_project\obj.cache\build\4t5lswwe.fue\dynp2fa1.gsl'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
Current Directory:
PS C:\Users\aiden\Documents\GitHub\TAFE.2020.S2.SMALL.GROUP.PROJECT\docfx_project>
As you can see, my current directory is the project directory. However the error message states it's trying to pull docfx data files from within' system32. The files it is trying to pull are within' my docfx project.
Since it cannot find the files in system32, it errors out.
Anyone know how or why this is happening??
...ANSWER
Answered 2020-Oct-14 at 10:41No idea why, but the version of Docfx (project files) on my laptop were not syncing properly to my PC.
I realized this, deleted the version on my PC (outdated one) and copied it over.
There must have been something messed up in my old Docfx project because as soon as I opened the new one, it worked.
QUESTION
I have some .md files that are happily built into articles of a site generated by docfx. The landing page of this site which at the moment is a index.md file is empty. I have a separate static html page that its content is rendered by javascript containing some graph etc. What I would like to do is to render this html content as the landing page of the docfx site.
How do I do that?
Any help is much appreciated. Thanks.
...ANSWER
Answered 2020-Oct-01 at 22:09If I understand your use case, this worked for me:
Add index.html at root. This is your HTML landing page.
Reference index.html in the resource
object in docfx.json:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install docfx
Open a console.
Enter the following commands to install DocFX and build/deploy a sample site: choco install docfx docfx init -q docfx docfx_project\docfx.json --serve
Go to https://localhost:8080 to view the sample DocFX site.
To build the DocFX binaries from the Visual Studio solution:.
Install Visual Studio 2019 with .NET Core cross-platform development toolset
Install Node.js
Build the solution using one of the following options: Option 1: Console Open a DOS console and navigate to your DocFX clone subdirectory. Run build.cmd. Option 2: Visual Studio Open a PowerShell console and navigate to your DocFX clone subdirectory. Run ./UpdateTemplate.ps1 to generate the template files required by the Visual Studio solution. Open the docfx.sln solution in your DocFX clone subdirectory from Visual Studio and build it.
dev is the default branch accepting Pull Requests. It releases a package daily. main branch is the release branch.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page