Are NuGet package definitions in .csproj files supported?

Looking at the dependencies of a project that consumes the “AvalonEdit” nuget package: https://github.com/icsharpcode/ILSpy/network/dependencies
GitHub seems to think that the “AvalonEdit” package is defined by tgjones/mini-c. That repository has a copy of an old version of the AvalonEdit.nuspec file (src/packages/AvalonEdit.4.2.0.8783/AvalonEdit.4.2.0.8783.nuspec) committed, but that’s just because it has the whole unzipped nupkg committed.

The official AvalonEdit repository is https://github.com/icsharpcode/AvalonEdit/.
Now, the current AvalonEdit version no longer use a .nuspec file, but instead defines its NuGet package in ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj via <PackageId>.

Does GitHub support detecting package definitions in .csproj files, or only package references?
If multiple repositories seem to provide the same package, how does GitHub determine which repository to use for the dependency graph?

Hi @dgrunwald! :wave: Welcome to the Community!

.csproj files are supported for the purposes of building dependency graphs, yes!

The package to repository allocation is algorithmically done, and sometimes imperfect, as in this case.

I’ve updated our system to show that the “AvalonEdit” package is actually hosted at icsharpcode/AvalonEdit.

If you spot any other mistakes along these lines, please let us know!

1 Like