Implicit package references can be displayed as explicit #9090
Labels
Feature-Dependency-Node
"Dependencies" node in Solution Explorer that display project, binary & package references
Regression
Regressions from a previous (typically public) build or release.
Triage-Approved
Reviewed and prioritized
Milestone
During the rewrite of the dependencies tree in #9008, the following issue crept in.
"Implicit" package references (i.e. those which were added via imported project files, not directly by the project file itself) are supposed to be displayed with a padlock icon indicating that they cannot be manually removed from the project. This icon is no longer displayed for package references following the rewrite.
In the dotnet/project-system repo, most of these packages are implicit, and should be displayed with a padlock overlay:
Investigation shows that the evaluated item has
IsImplicitlyDefined
set totrue
, however the resolved item from the design-time build does not. It only showsIsImplicitlyDefined
asfalse
.Looking into the SDK it seems the
ResolvePackageAssets
task only tracks a few well known packages, reporting them as implicitly defined (Microsoft.NETCore.App
andNETStandard.Library
).In this example, the
Figgle
package was imported via aDirectory.Build.props
file so should be identified as implicitly defined, but is not.I don't see any change in the SDK around this so believe the change in behaviour to have come from the rewrite in #9008.
That said, the best fix might actually be in the SDK. We should investigate whether we can determine this value, such as by inspecting the defining project for the item (as is done for the unresolved/evaluated item). We can keep a more elegant dependency tree implementation if we use MSBuild to massage the data into a correct and consistent format for ingestion by the tree, rather than having C# code to juggle inconsistent and incorrect values due to known problems.
The impact of this regression is reasonably low, but it would be great to fix it.
The text was updated successfully, but these errors were encountered: