Hi everyone at NuGet.org.
I’m using new format of the nuget package management that is fully integrated with MSBuild, it is very awesome and work very good except that it have one really odd error.
In old format(packages.config), we could use allowedVersions to limit version of allowed nugets, in this new format Version range should specified in Version tag of the PackageReference but
we have 2 problems with this:
- PackagaeManagerConsole does not respect this version limit,
So if I have Version=”[1.0.0, 1.5.0)” and there is a version 2.0.0 of the package, UI respect my limitation and show no update but Update-Package command will update my
reference to version 2.0.0
- If package updated to a newer version(a version that is allowed in my range), then new version will be written in place of old version and it will remove my version range limit
So if I have Version=”[1.0.0, 1.5.0)” and there is version 1.1.0 and 2.0.0 of the package, and I use nuget UI, it will update my project to version 1.1.0 as expected, but as a
side effect it will change my Version tag to Version=”1.1.0” and so remove my version limitation, and now it will show that I have an update for version 2.0.0.
I want to know how I use this new format and use old good allowedVersions or something that have same effect.
Ideas in #14767 and dotnet package update equivalent in #14313
Hi everyone at NuGet.org.
I’m using new format of the nuget package management that is fully integrated with MSBuild, it is very awesome and work very good except that it have one really odd error.
In old format(packages.config), we could use
allowedVersionsto limit version of allowed nugets, in this new format Version range should specified inVersiontag of thePackageReferencebutwe have 2 problems with this:
So if I have
Version=”[1.0.0, 1.5.0)”and there is a version2.0.0of the package, UI respect my limitation and show no update butUpdate-Packagecommand will update myreference to version
2.0.0So if I have
Version=”[1.0.0, 1.5.0)”and there is version1.1.0and2.0.0of the package, and I use nuget UI, it will update my project to version1.1.0as expected, but as aside effect it will change my Version tag to
Version=”1.1.0”and so remove my version limitation, and now it will show that I have an update for version2.0.0.I want to know how I use this new format and use old good
allowedVersionsor something that have same effect.Ideas in #14767 and dotnet package update equivalent in #14313