Skip to content

How to fix NuGet packages when upgrading .NET Framework

Robert Greiner
Robert Greiner

If you find yourself in the middle of upgrading the .NET Framework on your project, you may have encountered some errors letting you know that the project's associated NuGet packages need to be re-installed.

Have no fear, you are almost done with your upgrade. Long gone are the days of having to manually go through your entire project uninstalling the packages yourself. With NuGet 2.1+, this becomes trivial.

In Package Manager (View -> Other Windows -> Package Manager) type:

update-package -reinstall

This command will uninstall all NuGet packages in your entire solution and re-install them targeting the correct .NET framework.

Happy solution upgrading.

Please consider subscribing, it's free.
Technology

Robert Greiner Twitter

Professional optimist. I write a weekly newsletter for humans at the intersection of business, technology, leadership, and career growth.


Related Posts

Members Public

Navigating the Upside Down as a Technology Leader

Ideas for leading technology organizations with confidence and creativity.

Navigating the Upside Down as a Technology Leader
Members Public

Artist for a Day

The future of creative output is multiplied by AI.

Artist for a Day
Members Public

The Auto Industry's Cloud Awakening

Auto manufacturers are behind the cloud adoption curve but are well-positioned to unlock the future of mobility by building foundational capabilities across six key areas.

The Auto Industry's Cloud Awakening