Nuget re-targeting after upgrading .Net Framework

Photo by Mauro Gigli on Unsplash

Nuget re-targeting after upgrading .Net Framework

If you want to upgrade your project framework to a newer. For example, you want to upgrade from 4.5 to 4.8

You can use the following method when upgrading the framework in Visual Studio.

Choose your new framework from here:

Project-Properties-Application-Target framework

For example, choose 4.8

Then update the NuGet packages like this :

Tools-NuGet Package Manager-Package Manager Console

In Package Manager Console, run:

Update-Package -Reinstall