I'm using .NET Core, VS Code, Linux.
To update a package, I manually change the version in the .csproj
and then run dotnet restore
.
But how can I tell which packages are outdated using the dotnet
CLI?
dotnet-outdated can automatically attempt to upgrade any outdated packages to the latest version by passing the -u|--upgrade option. You can let dotnet-outdated prompt you for each outdated package by using the -u:prompt option.
The location of the default global packages folder. The default is %userprofile%\.nuget\packages (Windows) or ~/.nuget/packages (Mac/Linux).
In Visual Studio, use the Help > About Microsoft Visual Studio command and look at the version displayed next to NuGet Package Manager. Alternatively, launch the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and enter $host to see information about NuGet including the version.
Without installing any additional tool, I used this command:
dotnet list package --outdated
https://github.com/NuGet/Home/wiki/dotnet-list-package
I don't believe there's anything within vanilla .NET Core, but I've found a .NET Core global tool called NuKeeper which will do what you want:
# Install the global tool
$ dotnet tool install --global NuKeeper
# Run the tool to inspect a project in the current directory for updated dependencies
$ NuKeeper inspect
It can also perform the updates for you - see the link above for examples etc.
(I haven't used this before today, but I've just tried it on a sample project and it gave me the information I expected.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With