Central Package Management (CPM) and AllowedVersions in <PackageVersion> #14072
Replies: 3 comments 2 replies
-
Actually... AllowedVersions isn't needed as I just found out, locking to a specific version works like this:
What I haven't figured out is the above "anything lower than 8" |
Beta Was this translation helpful? Give feedback.
-
The syntax for a version lower than something is <PackageVersion Include="FluentAssertions" Version="(,8.0)" /> |
Beta Was this translation helpful? Give feedback.
-
So to be clear, the "allowedVersions" attribute is not supported in CPM? You should restrict versions in the Version directly with the same syntax as previously available in the allowedVersions tag? As @christophwille stated, how does the build determine which version to use when you just give it a range. My guess would be that it will always choose the highest available on nuget inside the bounds, but then how can I see which version that is outside of VS. Using a Version attribute to denote the current version and the "alowedVerions" to restrict the bounds feels much cleaner! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The basic idea
<PackageVersion Include="FluentAssertions" Version="7.0.0" AllowedVersions="[7.0.0,8.0.0)" />
with a syntax like https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort#version-ranges
Can this be done? (and is there anyone else who has a similar problem to solve)
Beta Was this translation helpful? Give feedback.
All reactions