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

Handle Update PackageReferences more correctly #8827

Merged
merged 7 commits into from Jan 18, 2024

Conversation

ryanbrandenburg
Copy link
Contributor

The existing code includes all packageReferences the TempProject as <PackageReference Include, regardless of how they were found in the original context. If (for a given project) a PackageReference exists only as <PackageReference Update MSBuild does not load that reference and it should not appear in the Dependencies list. The way I saw this manifesting was that packages which don't get a <PackageReference Include in the csproj were getting manually included due to PR Updates, which caused NU1605 errors (package downgrade). I assume it could have other downstream effects that don't occur to me ATM as well.

My fix is that we start keeping track of if we have only seen Update versions of particular PackageReference items, and if so we should add them to our temp project only as Update references.

@ryanbrandenburg ryanbrandenburg requested a review from a team as a code owner January 17, 2024 21:45
@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Jan 17, 2024
Copy link
Collaborator

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch with this fix.

@jakecoffman jakecoffman merged commit a10872c into main Jan 18, 2024
82 checks passed
@jakecoffman jakecoffman deleted the dev/rybrande/IncludeVSUpdate branch January 18, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants