Skip to content

[Bug] .NET API bug #10495

Open
Open
@SatriyoJati

Description

@SatriyoJati

Describe the bug
I have project that has multiple project dependencies described in .csproj file. When creating metadata using .csproj file. It got an error about unable to find local depedencies for project.
Image

To Reproduce
Steps to reproduce the behavior:

  1. Having a project with local dependencies maybe in another folder
  • MyProject

    • myproject.csproj
    • src
  • LibraryProject

    • src

myproject.csproj

<Project Sdk="Microsoft.NET.Sdk">
...
 <ItemGroup> 
...
<PackageReference Include="LibraryProject" Version="1.0.0" />
...
 </ItemGroup>
...
</Project>

in the .csproj define packageReference to refer local project .

  1. setup the docfx
    Expected behavior
{
  "$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
  "metadata": [
    {
      "src": [
        {
          "src": "../MyProject/",
          "files": [
            "**/*.csproj"
          ]
        }
      ],
      "dest": "api"
    }
  ],
  "build": {
    "content": [
      {
        "files": [
          "**/*.{md,yml}"
        ],
        "exclude": [
          "_site/**"
        ]
      }
    ],
    "resource": [
      {
        "files": [
          "images/**"
        ]
      }
    ],
    "output": "_site",
    "template": [
      "default",
      "modern"
    ],
    "globalMetadata": {
      "_appName": "mysite",
      "_appTitle": "mysite",
      "_enableSearch": true,
      "pdf": true
    }
  }
}

Context (please complete the following information):

  • OS: Windows 11 Pro

  • Docfx version: 2.78

  • .NET version: .NET 8.0

  • Exceptions

// Paste the full exception with stacktrace here, remove sensitive info
  • Errors and warnings
// Paste warnings or errors related to this bug here, remove sensitive info
Loading project C:/Users/CADIT-IDN/WORK/docgeneratorresearch/bugfixreference/etip.ecu/ETIP.ECU.InternalAPI/ETIP.ECU.InternalAPI.csproj
    <MyProject>.csproj : error NU1101: Unable to find package <name of package> No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org
  • .NET info

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnetGenerate .NET API reference docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions