ResolvePackageAssets task should log package dependency chain on each item
See original GitHub issueOriginally 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:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@dsplaisted @rainersigwald