Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idempotent Project Changes can leave Dependency Node Unresolved #2510

Closed
natidea opened this issue Jun 27, 2017 · 3 comments · Fixed by #7990
Closed

Idempotent Project Changes can leave Dependency Node Unresolved #2510

natidea opened this issue Jun 27, 2017 · 3 comments · Fixed by #7990
Assignees
Labels
Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. Triage-Approved Reviewed and prioritized
Milestone

Comments

@natidea
Copy link
Contributor

natidea commented Jun 27, 2017

Repro Steps

Create a .NET Standard project and add the following package references:

  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" Version="10.0.0" />
    <PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
  </ItemGroup>

Observe that the Newtonsoft.Json reference is flagged with warning NU1603 Package not found, approximate best match was resolved.

image

Add NoWarn="NU1603" to the StyleCop.Analyzers reference (i.e. to the wrong node)

Expected

No changes to dependencies node.

Actual

StyleCop.Analyzers becomes and remains unresolved, anticipating a new resolved node. This is likely because the change did not trigger a dataflow with a "Difference".

Workaround is to make some other change that triggers a dataflow (e.g. change version to 1.0.1)

@natidea natidea added the Bug label Jun 27, 2017
@natidea natidea added this to the 15.5 milestone Jun 27, 2017
@Pilchie Pilchie modified the milestones: 15.5, 15.6 Oct 17, 2017
@Pilchie Pilchie added Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Area-New-Project-System labels Dec 20, 2017
@natidea natidea modified the milestones: 15.6, 15.7 Jan 23, 2018
@Pilchie Pilchie assigned etbyrd and unassigned natidea Mar 30, 2018
@Pilchie Pilchie modified the milestones: 15.7, 15.8 Mar 30, 2018
@Pilchie Pilchie modified the milestones: 15.8, 16.0 Jul 3, 2018
@jjmew jjmew modified the milestones: 16.0, 16.X Feb 13, 2019
@drewnoakes drewnoakes self-assigned this Feb 20, 2019
@drewnoakes drewnoakes added this to the 16.1 milestone Feb 20, 2019
@jjmew jjmew modified the milestones: 16.1, 16.2 Apr 2, 2019
@drewnoakes drewnoakes modified the milestones: 16.2, 16.3 Jun 13, 2019
@drewnoakes drewnoakes modified the milestones: 16.3, 16.4 Jul 17, 2019
@drewnoakes drewnoakes modified the milestones: 16.4, 16.x Oct 1, 2019
@etbyrd etbyrd removed their assignment Nov 11, 2019
@drewnoakes
Copy link
Member

Another way to trigger this:

  • Add a package reference
  • Modify metadata on the package (i.e. set NoWarn to nullable)

@drewnoakes
Copy link
Member

drewnoakes commented May 1, 2020

#5335 has another simple way to trigger this behaviour.

@drewnoakes
Copy link
Member

Another test case for this is moving a dependency (e.g. PackageReference) from the project file to Directory.Build.props.

@drewnoakes drewnoakes modified the milestones: 16.x, 17.x Aug 18, 2021
@drewnoakes drewnoakes modified the milestones: 17.x, 17.2 Mar 21, 2022
@ghost ghost added the Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. label Mar 23, 2022
@drewnoakes drewnoakes removed the Bug label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. Triage-Approved Reviewed and prioritized
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants