Scott Hanselman

Your dotnet outdated is outdated! Update and help keep your .NET projects up to date

November 12, 2020 Comment on this post [9] Posted in DotNetCore | Open Source
Sponsored By

I've talked about the dotnet-outdated tool before but now it's, ahem, outdated. It's moved to new owners so head over to your command line and update "dotnet-outdated" like this:

dotnet tool uninstall --global dotnet-outdated
dotnet tool install --global dotnet-outdated-tool

Just copy paste those and you'll be updated. Yes, it's changed it's moniker but the tool is the same and you still invoke it with "dotnet outdated." You can learn more about the wonderful dotnet outdated tool on their GitHub! Take a moment, Dear Reader, and give them a GitHub Star!

Now, here's the output of dotnet outdated on my own podcast's website

dotnet outdated finds older NuGet packages

I enjoy the use of color with this command line tool. Note that it's calling out that there may be some real Breaking Changes with some of these version number moves. Updating to a major version could be scary, so I'll take extra care there.

If I was feeling super lucky, I could do a dotnet outdated -u and have it automatically upgrade all my references and then test the resulting project. I could also update just a few, or do them one at a time. If you combine dotnet outdated with Github bots like Dependabot you can really get a handle all libraries updates once and for all.

dotnet outdated
No outdated dependencies were detected

Woohoo!


Sponsor: Have you tried developing in Rider yet? This fast and feature-rich cross-platform IDE improves your code for .NET, ASP.NET, .NET Core, Xamarin, and Unity applications on Windows, Mac, and Linux.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
November 17, 2020 17:09
Great tool! FYI, I think the link you're using for the project (both instances) is not the one you intended. It goes to issue #40 instead of the project home page on GitHub.
November 17, 2020 17:14
This is really cool tool, not to integrate it into the build pipelines to generate this report automatically.
November 17, 2020 20:47
I love that you can pass the argument -vl:Major to only automatically update Minor versions.
November 18, 2020 13:29
Can this tool be used for non-.NET core solutions?
November 18, 2020 15:12
Peter - yes, with the big caveat that it needs to be using the new SDK stlye projects (which let's be honest, most net4x projects don't). It works by leaning on the PackageReference and project.assets.json produced by the SDK tooling and reads from that.
November 18, 2020 17:38
We just need to copy-paste these commands and it will be done. Great search mate.
November 19, 2020 20:23
Hi. Previous yr I properly defended my coursework, and eventually moved on to your final phase of my experiments for the university. I owe an awful lot to those fellas, only they might craft the paper so competently and gracefully. I will ask for help again and again
summary maker
November 19, 2020 20:59
Is there a way to use the -u flag and have the tool split dependency packages for multiple targets, e.g. netcoreapp3.1 and net5.0?
November 19, 2020 21:14
Answer to my own question. After creating separate ItemGroup sets like this:

ItemGroup Condition="'$(TargetFramework)' == 'net5.0'"

The -u updates the packages correctly for the specified target.

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.