question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ResolvePackageAssets task should log package dependency chain on each item

See original GitHub issue

Originally posted by @KirillOsenkov in https://github.com/NuGet/Home/issues/10796#issue-865359017

The ResolvePackageAssets task takes in PackageReference items and produces RuntimeCopyLocalItems. It is not clear why a certain file ends up in RuntimeCopyLocalItems.

A new metadata should be logged on each file that shows the dependency chain from a root package to the package that caused this file inclusion.

This information is available in project.assets.json but is very hard to parse.

Having this metadata would significantly simplify investigations answering questions such as “why is this file being copied to output” and “which NuGet package was the root package that eventually caused this file to be included”.

Mockup: image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dsplaistedcommented, Feb 18, 2022

This doesn’t seem to me like something that we should be doing in ResolvePackageAssets. We’d need to reconstruct the package graph and walk it, which I don’t think we currently do at all. Also, there’s not necessarily just one path of dependencies, and there may be more than one root PackageReference bringing something in.

I think if you search for the asset in the Solution Explorer in Visual Studio, it may show you the dependency chain. Barring that, I think the best solution would be to have a tool that can process the assets file and produce this information.

0reactions
KirillOsenkovcommented, Feb 17, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

ResolvePackageAssets task should log package ...
A new metadata should be logged on each file that shows the dependency chain from a root package to the package that caused...
Read more >
The "ResolvePackageAssets" task failed unexpectedly
It generally happens when the Mono's MSBuild - that is being used by Visual Studio to build the project - does not support...
Read more >
Untitled
BuildTasks · … https://app.snyk.io/advisor/npm-package/log-pose Failed to resolve selected task sequence dependencies. Code… Web28. Nov.
Read more >
NuGet Package Dependency Resolution
Details on the process through which a NuGet package's dependencies are resolved and installed in both NuGet 2.x and NuGet 3.x+.
Read more >
Package built with dependency on another ...
Run into another issue with build tool plugins that I am a bit stumped by; I have the following packages: package-data-model - defines...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found