Skip to content

VS2019 only: NullReferenceException when generating API for DotNet Standard and Core projects #4869

@mnoreke

Description

@mnoreke

Operation System: Windows
DocFX Version Used: 2.43.2.0

Steps to Reproduce:

  1. Download the docfx-seed repository
  2. Remove everything in the src directory
  3. Copy an existing .Net Core (2.2) or .Net Standard (2.0) into the src directory
  4. Update the docfx.yml file to use "files": [ "/*.sln", ".*.csproj" ],
  5. Run docfx.exe docfx.json

Expected Behavior:
API is processed

Actual Behavior:
Warning: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Ignored.
followed by:
Error: System.NullReferenceException: Object reference not set to an instance of an object.

I downloaded the source, and the warning occurs in ExtractMetaDataWorker at line 82 with an inner exception of:
{"Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}

I do not have VS2017 installed, only VS2019. The release notes show that this is to be supported as of Version 2.43.1 (fixed by issue #4437).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions