Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Remove unnecessary NuGet package references. #3449
Remove unnecessary NuGet package references. #3449
Changes from 5 commits
291d0b3
de9bf34
a2ccd9d
69e471a
12fa032
d16aad0
7825862
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll surprised this did not fail the build.
The versions should remain managed in packages.targets.
There's a section with packages used in test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also surprised it didn't fail the build, but it didn't. This suggests that removing the versions might leave these
PackageReference
s without a version, in which cause the build might fail. So, my thought is we merge as-is, and we should fix our msbuild files as an engineering improvement, and not burden the contributor for this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I buy that.
Can we create a follow-up issue first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too late, I used the
SystemPackagesVersion
property.If I recall correctly, these references stayed because they resolve package version conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NuGet/Home#9790
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it again to build without these references and got this (adjusted for brevity):
Same with the other packages. The real fix was to upgrade
Newtonsoft.Json
but unfortunately it can't be done at the moment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zivkan, it didn't fail the build because the
SystemPackagesVersion
property is equal to4.3.0
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the issue I linked, our MSBuild targets are supposed to validate that no
PackageReference
has aVersion
attribute set before it then applies all the versions. This isn't working, but is out of scope for your PR. Assuming the current build in progress is green, I'll merge this PR and the NuGet team will be responsible for fixing up our MSBuild files (unless someone in the community wants to do it and send a PR 😊 ).