This must be a bug of the NuGet Package Manager I'm using (version 4.6.0). I used the option DependencyVersion highest
but it always picks the lowest version for dependencies.
Like this (I'm trying to install Serilog.AspNetCore
with dependencies of 2.2.0 - the latest but 2.0.0 is always picked).
install-package Serilog.AspNetCore -DependencyVersion highest
One dependency it picks is Microsoft.AspNetCore.Http.Abstractions 2.0.0
but I expected it to pick Microsoft.AspNetCore.Http.Abstractions 2.2.0
.
It's important because in my project the version 2.2.0
is required, Serilog should adapt that requirement by installing with that correct version of dependencies. But here I could not do anything to help it understand what I want.
Also the Install and Update options are not shown in the UI of NuGet Package Manager (the DependencyVersion
could be selected there as well when using UI to install packages). So this appears to be some bug at least in the specific version of Nuget package manager I'm using.
What could I do to solve this issue? Can I try fixing the installed nuget manager (there is not any update in the Updates window).
Update
I've just tried a traditional .NET project, it works. But the problem raised when my projects target .NET Core (ASP.NET Core)? Looks like it does not support that feature for .NET Core projects?