All .NET Core applications starting with .NET Core 2.0 automatically roll forward to the latest minor version installed on a system.
You can modify this behavior by changing the setting for the roll-forward on no candidate shared framework. The available settings are:
0
: disable minor version roll-forward behavior. With this setting, an application built for .NET Core 2.0.0 will roll forward to .NET Core 2.0.1, but not to .NET Core 2.2.0 or .NET Core 3.0.0.1
: enable minor version roll-forward behavior. This is the default value for the setting. With this setting, an application built for .NET Core 2.0.0 will roll forward to either .NET Core 2.0.1 or .NET Core 2.2.0, depending on which one is installed, but it will not roll forward to .NET Core 3.0.0.2
: enable minor and major version roll-forward behavior. If set, even different major versions are considered, so an application built for .NET Core 2.0.0 will roll forward to .NET Core 3.0.0.The roll-forward behavior does not apply to preview releases. By default, it also does not apply to major releases, but this can be changed with the above settings.
You can change the setting in any of the following ways.
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX
environment variable to the desired value."rollForwardOnNoCandidateFx" : 0
dotnet run --rollForwardOnNoCandidateFx=0
Patch version roll forward is independent of this setting and is done after any potential minor or major version roll forward is applied.