Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    jalley3
    @jalley3
    anyone ?
    :(
    jalley3
    @jalley3
    dotnet/docfx#7064 nvm i think it was a bug on their end
    anyone know how to get the summary and type for inherited members?
    Paul Pacheco
    @paulpach
    I see some betas for docfx v3, is it close to GA?
    Cary
    @cary-hu
    Is there any way to convert YAML to XML? and the YAML is generate by DocFX
    Mike
    @mikejr83

    Has anyone built a Docker image for DocFX 2.x that supports metadata creation for .NET Core applications? I've created my own image using knsit/docfx:latest as a base and then adding the .NET Core SDK over top of it. The problem I'm running into is that DocFX is using mono as the inner compiler:

    [21-03-19 01:53:58.802]Info:[ExtractMetadata]Using mono /usr/lib/mono/msbuild/15.0/bin/MSBuild.dll as inner compiler.

    This gives me the following error:

    [21-03-19 01:53:58.942]Error:System.IO.DirectoryNotFoundException: Could not find a part of the path '/proc/self/task/8/fd/4'
    I should mention that I'm attempting this on a Windows host, but the goal is to be able to get the image out to our CICD environment so that we can get our APIs to generate documentation on build.
    Thomas Ibel
    @tibel
    Is someone from the DevTeam here that can answer this or at least forward to the responsible PM?
    lectr1c
    @lectr1c
    Hello, I have a C# project using .NET Standard 2.0 and .NET 5, when setting up they get built into two separate sites, how can I combine them so they both show in the table of contents?
    minecraftchest1
    @minecraftchest1:matrix.org
    [m]
    Hello. I am trying to get docfx to build documentation for a NuGet package I own. However, even when creating a new docfx project from scratch and copying the files over, it does not build any documention.
    I get this warning.
    Build succeeded with warning.
    [21-05-25 07:17:45.785]Warning:[MetadataCommand.ExtractMetadata]No metadata is generated for Minecraftchest1-utils.
            1 Warning(s)
            0 Error(s)
    Is there something I need to do before building the site?
    minecraftchest1
    @minecraftchest1:matrix.org
    [m]
    Apparently I need to enable xml comments in my project.
    minecraftchest1
    @minecraftchest1:matrix.org
    [m]
    I am still having issues.
    Bill Hertzing
    @BillHertzing
    Using docfx 2.57.2, it is not generating documentation for the new c# 9.0 records. Known issue?
    Bill Hertzing
    @BillHertzing
    I see that dotnet/docfx#7191 asks the same question, was opened 2021-03-14, and has had no response....
    Thomas Ibel
    @tibel
    I'm facing dotnet/docfx#7406 too. Any chance we get a new release in the next hours/days?
    jalley3
    @jalley3
    can you add a custom 404 page?
    Bill Hertzing
    @BillHertzing
    The site RealFaviconGenerator.net will create 10 files that ensures our documentation site has all the files needed to support favicon across many browsers. These 10 files have to be installed into the root of the documentation site. To keep the source repository cleanly organized, I'd like to store these 10 files in <reporoot>/assets/siteroot. Can DocFx copy the contents of <reporoot>/assets/siteroot into <reporoot>/_site during document generation? and if so, could someone share the .docfx snippet(s) necessary to accomplish it? Thanks!
    Jokinko
    @jozefchmelar
    image.png
    Hello. I have a code generation tool which processes PLC code to C# and I'm using docfx to generate documentation ..The problem is that the code generation tool will not generate a an object of type "UINT" but of type "System.Object" ...there's a a PLC type in the description part though... Do you think it is possible to write a plugin, which will parse the description and edit the type value? so I get Type : UIT, Description : Twin type UInt
    TermWay
    @TermWay_gitlab
    Hello, Is there a way to have the same rendering using <see langword="null"/> and <c>null</null> or better with a link like in this page https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/strings/ which link the null keyword to the documentation ?
    image.png
    TermWay
    @TermWay_gitlab
    image.png
    I did it directly with the source code. Goodbye!
    Timon
    @TimonPost
    Using docfx 3, is there a example file on how to link projects to be documented? Have been looking in th v3 branch for references but could not find anything I was looking for. Thanks
    1 reply
    David Márquez Fàbrega
    @DavidMarquezF
    Are plugins already supported in the v3-release branch? I suppose now they will have to be written for the markdig processor no?
    BrettGFleischer
    @BrettGFleischer

    Hi all, I am busy documenting a multi project solution. I have managed to generate the required .yml files in a separate folder for each project, however, some of the projects make reference to the same classes in an other shared project resulting in some nasty warnings:

    Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ManagedReferenceDocumentProcessor.Save](ProjectA_sdk/ProjectB.Provider.Models.yml)Uid(ProjectB.Provider.Models) has already been defined in ProjectB-plugins/ProjectB.Provider.Models.yml.

    Now I have tried several different variations of the exclude semantics inside of the src section within the docfx.json file but these files will just not be excluded. Sample of the excludes I have tried:

    "exclude": [
                //"ProjectB.Provider/**.csproj",
                //"ProjectB.Provider/**",
                //"ProjectB.Provider/Models/**",
                "**/bin/**",
                "**/obj/**",
                "_site/**"
              ]

    Is there anything I am missing W.R.T this exclude section? If not the next avenue I will explore is the Filtering of Unwanted APIs.

    Morten Nielsen
    @dotMorten

    @BrettGFleischer It shouldn't be a problem if you just merge the two generated TOC's above with a new toc. ie:

     "metadata": [
        {
          "src": [
            {
              "files": [
                "Common/Common.csproj",            
              ],
              "src" : "../../../src/"
            }
          ],
          "dest": "../../../../../output/docs/api/Common",
          "properties": { "TargetFramework": "net6.0" },
        }, {
          "src": [
            {
              "files": [
                "Common.Utilities/Common.Utilities.csproj",
              ],
              "src" : "../../../src/"
            }
          ],
          "dest": "../../../../../output/docs/api/Common.Utilities",
          "properties": { "TargetFramework": "net6.0" },
        },
    ]

    Then above the two output folders, create a toc.yml with something like this:

    - name: Common
      href: Common/toc.yml
    - name: Common.Utilities
      href: Common.Utilities/toc.yml

    This root folder is what you'll point the build to

    1 reply
    Lake
    @Lachee
    hey, how can I make docfx listen to the DefineConstants property ? I keep trying to define UNITY_EDITOR but it isn't generating those files
    Max Inno
    @innomaxx
    Hello. Is it possible to set default page instead of generating almost empty index.html? I would like make generated page from README.md as default
    Lake
    @Lachee
    Since i didnt end up getting any help with adding scripting defines in non-csproj projects, I decided to make a csproj and do it that way
    however, I am getting this error now:
    ```
    [22-07-05 02:56:24.369]Warning:[MetadataCommand.ExtractMetadata](D:/Users/Lachee/Documents/Unity Projects/lachee-utilities/Packages/com.lachee.utilities/Docfx.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'D:\Users\Lachee\Documents\Unity Projects\lachee-utilities\Packages\com.lachee.utilities\Docfx.csproj' with message: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    <Project Sdk="Microsoft.NET.Sdk">
    
      <PropertyGroup>
        <TargetFramework>netcoreapp3.1;netstandard2.0;netcoreapp3.0;net45</TargetFramework>
      </PropertyGroup>
    
      <ItemGroup>
        <Compile Include="Scripts/**/*.cs" />
      </ItemGroup>
    
      <ItemGroup>
        <Compile Remove="**/*.meta" />
        <None Remove="**/*.meta" />
    
        <Compile Remove="**/*.asmdef" />
        <None Remove="**/*.asmdef" />
    
        <Compile Remove="Documentation~\**" />
        <None Remove="Documentation~\**" />
      </ItemGroup>
    
    </Project>
    {
        "metadata": [
            {
                "src": [
                    {
                        "src": "..",
                        "files": [
                            "Docfx.csproj"
                        ]
                    }
                ],
                "dest": "api"
            }
        ]
    }
    Rhys van der Waerden
    @rhys-vdw
    Is it possible to format primitives but their more recognized alias? E.g. float instead of System.Single
    Calvin Wilkinson
    @CalvinWilkinson
    Hello everybody. I am new to docfx and I need to create a doc site that shows API documentation for different versions of my api. I have been looking for a way to do it and I cannot find a way or any tutorials. I know it doesn't do it out of the box and 3.0 which is in beta will provide that feature, but I need something until 3.0 is released. Any advice or resources on this would be awesome!!
    Something simular to what docs.unity3d.com does
    Ahmed Yasin Koculu
    @koculu:matrix.org
    [m]
    Hi everybody,
    I am trying to create a doc for my open source project https://github.com/koculu/ZoneTree
    using https://github.com/dotnet/docfx/releases/tag/3.0.0-beta1.1235%2Bf5a62adcac
    I created the configuration based on https://github.com/docascode/template/tree/main/samples
    I use
    dotfx build
    dotfx serve
    commands.
    My problem is, the API reference is not getting created.
    Could you please give some pointer to create metadata with v3? Shall I use v2.59 dotfx metada command to create API reference yml's?
    I also tried that but created metadata yml seems like incompatible with v3.
    Calvin Wilkinson
    @CalvinWilkinson
    Ok so I have made some progress. I originally was pointing to a project file using "src/**.csproj". This was not working. I changed to "src/**.cs" and now it is working. Reading the docs tells me that it depends on VS2017 to be installed on the machine for project based metadata generation. I have VS2022 though. 🤷🏼
    Samira Maleki
    @samiramaleki
    Hi everybody,I need to custom TripleSlashCommentModel to expose the new tag, then render but, how do I use the class library in the docfx after changed
    Here is the code: https://github.com/dotnet/docfx/blob/dev/src/Microsoft.DocAsCode.Metadata.ManagedReference.Common/Parsers/TripleSlashCommentModel.cs
    @superyyrrzz @rhys-vdw @tkopacz @idargb @furier @superyyrrzz @bloudraak @tgaldi @henkmeulekamp @vinhui
    Craig
    @Craig-J

    Hi, I'm setting up a docs pipeline for TypeScript using https://api-extractor.com/ and DocFX. I tried the tool on this page before deciding to use API-Extractor but was unsuccessful: https://dotnet.github.io/docfx/tutorial/universalreference/gen_doc_for_ts.html

    Is there a reason API extractor isn't the recommendation on this page? It seems to be the tool officially used by microsoft but I can't find much resources about setting up a pipeline using it.

    Mark Vincze
    @markvincze

    Hey folks,

    Is it okay to ask questions related to docfx issues here?

    I'm building documentation with docfx for a .NET Core solution (the projects are targeting net5.0 and net6.0).
    I'm doing this on Linux in a Docker container, the container is based on mcr.microsoft.com/dotnet/sdk:6.0, and has a couple of extra things:

    • Mono is installed
    • nuget.exe is downloaded
    • The packages docfx.console and SQLitePCLRaw.core are installed with nuget

    When I try to build the docs by running

    mono ./docfx/docfx.console/tools/docfx.exe ./docs/docfx.json

    The documentation is built, but there are two Warnings in the output that I'm trying to chase down.
    I'm getting these:

    [22-12-13 03:48:42.333]Warning:[MetadataCommand.ExtractMetadata](/app/src/MySolution/MySolution.Common.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file '/app/src/MySolution/MySolution.csproj' with message: /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets: (1232, 5): The reference assemblies for ".NETFramework,Version=v6.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK.

    Yet the SDK seems to be installed if I check it with dotnet:

    dotnet --list-sdks
    6.0.403 [/usr/share/dotnet/sdk]

    Or to make it work with Mono I need some extra config?
    And the other error I'm constantly seeing in the output is this:

    [22-12-13 03:48:50.131]Warning:[MetadataCommand.ExtractMetadata](/app/src/MySolution/MySolution.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file '/app/src/MySolution/MySolution.csproj' with message: /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets: (1733, 5): The "GetReferenceNearestTargetFrameworkTask" task failed unexpectedly.
    System.MissingMethodException: Method not found: NuGet.Frameworks.NuGetFramework NuGet.Frameworks.NuGetFramework.ParseComponents(string,string)
      at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.Execute () [0x00142] in <284aae14d5034455899563954b017376>:0
      at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <3fa5db086dc941c1a57d0f5b812004f0>:0
      ...

    Anybody has any ideas what these might be caused by?
    The Dockerfile for the image in which I'm trying to do this build looks like this:

    FROM mcr.microsoft.com/dotnet/sdk:6.0
    
    RUN apt update && \
        apt install -y apt-transport-https dirmngr && \
        apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
        echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list && \
        apt update && \
        apt install -y mono-devel mono-runtime msbuild curl && \
        curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe && \
        echo '#!/bin/bash\nmono /usr/local/bin/nuget.exe "$@"' > /usr/bin/nuget && \
        chmod +x /usr/bin/nuget