Skip to content

Error with MacOS #12

Description

@tatelax

Hi,

I'm having trouble getting this working. I'm getting the following error in a brand new Unity project.

I have Visual Studio for Mac as well as Mono installed. I installed docfx through Homebrew.

[20-04-19 05:38:03.743]Warning:[MetadataCommand.ExtractMetadata](/Users/tatemccormick/Documents/documentationtest/Assembly-CSharp.csproj)Error opening project /Users/tatemccormick/Documents/documentationtest/Assembly-CSharp.csproj: The type initializer for 'Microsoft.Build.Collections.MSBuildNameIgnoreCaseComparer' threw an exception.. Ignored.
[20-04-19 05:38:03.748]Info:[MetadataCommand]Completed Scope:MetadataCommand in 553.0567 milliseconds.
[20-04-19 05:38:03.748]Error:Error extracting metadata for /Users/tatemccormick/Documents/documentationtest/Assembly-CSharp.csproj: System.NullReferenceException: Object reference not set to an instance of an object
  at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.SaveAllMembersFromCacheAsync () [0x00380] in <36cbd452dc6f4b5d8daa3dce4c7355a8>:0 
  at Microsoft.DocAsCode.Metadata.ManagedReference.ExtractMetadataWorker.ExtractMetadataAsync () [0x000c0] in <36cbd452dc6f4b5d8daa3dce4c7355a8>:0 

My docfx.json

{
    "metadata": [
        {
            "src": [
                {
                    "src": "..",
                    "files": [ "**.csproj" ]
                }
            ],
            "globalNamespaceId": "Global",
            "filter": "filterConfig.yml",
            "dest": "api"
        }
    ],
    "build": {
        "globalMetadata": {
            "_appTitle": "Example Unity documentation",
            "_appFooter": "Example Unity documentation",
            "_enableSearch": true
        },
        "content": [
            {
                "files": [ "toc.yml", "index.md" ]
            },
            {
                "src": "api",
                "files": [ "*.yml" ],
                "dest": "api"
            },
            {
                "src": "manual",
                "files": [ "toc.yml", "*.md" ],
                "dest": "manual"
            }
        ],
        "overwrite": [
            {
                "src": "..",
                "files": [ "Assets/Scripts/**/*.md" ]
            }
        ],
        "resource": [
            {
                "files": [ "resources/**/*" ]
            }
        ],
        "sitemap":
        {
            "baseUrl": "https://normanderwan.github.io/DocFxForUnity",
            "changefreq": "weekly",
            "fileOptions": {
                "api/*": {
                    "changefreq": "daily"
                }
            }
        },
        "xref": [ "https://normanderwan.github.io/DocFxForUnity/Unity/2019.3/xrefmap.yml" ],
        "xrefService": [ "https://xref.docs.microsoft.com/query?uid={uid}" ],
        "dest": "../_site"
    }
}

My filterConfig.yml

apiRules:
- include:
    uidRegex: ^Example
    type: Namespace
- exclude:
    uidRegex: .*
    type: Namespace

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions