When I create some nuget (N1) that uses other nugets (N2), I reference it with floating version (e.g. 3.). I do this so that whoever uses my nuget (N1) will get the latest minor of the dependencies (N2). Since the latest contains bug fixes but won't break API (semantic versioning). P1 references my N1 with floating version too (e.g. 2.).
My problem is that there might be a project (P1) that uses my nuget (N1) and also references a lower version of N2. In this case when building that project (P1) we might get a dependency downgrade warning. And if treat warnings as errors is marked, it will break the build (of P1).
To avoid breaking the builds I am increasing major of nuget N1. Not ideal since it's not really a breaking change. And it forces me to upgrade all the using projects.
I would like to mark the minimum version of N2 that N1 requires (e.g. 3.0.0), and let P1 (or any other project) choose the latest of N1. But I didn't find a way to do it with package reference.
Is it possible to do it? Is there a better way to design the projects/nugets?