-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
We are requesting a configuration option within Central Package Management (CPM) to change the default behavior of floating version resolution from oldest available to newest available (highest patch or highest minor version).
Scenario
We use floating versions for our internal NuGet packages (e.g., Version="1.0.*"). This approach is by design, allowing developers to automatically pick up the latest updates in a standard build flow.
We recently attempted to migrate our version management to Central Package Management (Directory.Packages.props) to DRY our configurations.
Problem
We discovered that when using CPM, the dotnet restore --force-evaluate command resolves to the oldest available version that matches the float pattern, whereas specifying versions directly in .csproj files resolves to the newest available version.
This difference in behavior prevents us from migrating to CPM, as we rely on the newest available version resolution to ensure developers are always building against the most current internal package updates.
Desired Behavior
We would like a configuration property (e.g., in Directory.Packages.props) that allows users to explicitly opt-in to the newest available resolution strategy when using floating versions within CPM.
Example properties could be <CentralPackageFloatingVersionResolution>Newest</CentralPackageFloatingVersionResolution> or a similar mechanism that aligns the CPM behavior with the behavior previously found in non-CPM projects.