-
Notifications
You must be signed in to change notification settings - Fork 606
Prevent downstream dependencies to pickup MinVer as a depencency #1838
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
base: main
Are you sure you want to change the base?
Prevent downstream dependencies to pickup MinVer as a depencency #1838
Conversation
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.
Thank you @romerod
Does this apply to any of the other package references in this project as well?
Any package that is development time only and not a run time dependency, should have this. This should be automatic when adding the reference through NuGet tooling. |
exactly, I didn't focus on the other global references. Did take a quick look now and at first sight they also seem to be development time dependencies. |
@paulomorgado @romerod please make the necessary changes for all dev-time deps in this PR. Thank you. |
To start, I've created a PowerShell script to list all packages in referenced by the project: $rr = dir *.csproj -File -Recurse | ? { ($_.DirectoryName -notlike '*Test*') -and ($_.DirectoryName -notlike '*Benchmarks*') -and ($_.DirectoryName -notlike '*Build*') -and ($_.DirectoryName -notlike '*toxiproxy-netcore*') } | % { $p = $_.Name; $r = (dotnet msbuild $_.FullName -getItem:PackageReference | ConvertFrom-Json); $r.Items | % { $_.PackageReference | Add-Member -NotePropertyName 'Project' -NotePropertyValue $p }; $r.Items.PackageReference } One can query it as: $rr | select Project, Identity, Version, IncludeAssets, PrivateAssets | ft -a
Since |
Proposed Changes
MinVer is beeing picked up by downstream dependencies which it shouldn't, see https://github.com/adamralph/minver/blob/main/README.md?plain=1#L55 .
This even breaks compatibility of the package with NonSDK projects.
https://www.nuget.org/packages/RabbitMQ.Client.OAuth2 was already published with this dependency.
As I didn't change any code I didn't run the tests.
Types of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.
CONTRIBUTING.md
document